mirror of
https://github.com/transmission/transmission
synced 2025-03-11 06:32:59 +00:00
(trunk libT) #3311 "MingW build of Transmission" -- added rb07's revisions to my revisions to his diff. :P
This commit is contained in:
parent
4a9e36e842
commit
8b386a63b1
3 changed files with 3 additions and 1 deletions
|
@ -152,7 +152,7 @@ tr_net_strerror( char * buf, size_t buflen, int err )
|
||||||
{
|
{
|
||||||
*buf = '\0';
|
*buf = '\0';
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
FormatMessage( FORMAT_MESSAGE_FROM_SYSTEM, NULL, e, 0, buf, buflen, NULL );
|
FormatMessage( FORMAT_MESSAGE_FROM_SYSTEM, NULL, err, 0, buf, buflen, NULL );
|
||||||
#else
|
#else
|
||||||
tr_strlcpy( buf, tr_strerror( err ), buflen );
|
tr_strlcpy( buf, tr_strerror( err ), buflen );
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -256,6 +256,7 @@ tr_select( int nfds,
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
if( !r_fd_set->fd_count && !w_fd_set->fd_count && !c_fd_set->fd_count )
|
if( !r_fd_set->fd_count && !w_fd_set->fd_count && !c_fd_set->fd_count )
|
||||||
{
|
{
|
||||||
|
const long int msec = t->tv_sec*1000 + t->tv_usec/1000;
|
||||||
tr_wait_msec( msec );
|
tr_wait_msec( msec );
|
||||||
}
|
}
|
||||||
else if( select( 0, r_fd_set->fd_count ? r_fd_set : NULL,
|
else if( select( 0, r_fd_set->fd_count ? r_fd_set : NULL,
|
||||||
|
|
1
third-party/dht/dht.c
vendored
1
third-party/dht/dht.c
vendored
|
@ -66,6 +66,7 @@ THE SOFTWARE.
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
|
|
||||||
#define EAFNOSUPPORT WSAEAFNOSUPPORT
|
#define EAFNOSUPPORT WSAEAFNOSUPPORT
|
||||||
|
#define EAGAIN WSAEWOULDBLOCK
|
||||||
static int
|
static int
|
||||||
set_nonblocking(int fd, int nonblocking)
|
set_nonblocking(int fd, int nonblocking)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue