diff options
Diffstat (limited to 'external/miniupnpc/connecthostport.c')
-rw-r--r-- | external/miniupnpc/connecthostport.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/external/miniupnpc/connecthostport.c b/external/miniupnpc/connecthostport.c index 98f72535d..1f2a032ee 100644 --- a/external/miniupnpc/connecthostport.c +++ b/external/miniupnpc/connecthostport.c @@ -1,7 +1,7 @@ -/* $Id: connecthostport.c,v 1.12 2014/02/05 17:26:46 nanard Exp $ */ +/* $Id: connecthostport.c,v 1.15 2015/10/09 16:26:19 nanard Exp $ */ /* Project : miniupnp * Author : Thomas Bernard - * Copyright (c) 2010-2014 Thomas Bernard + * Copyright (c) 2010-2015 Thomas Bernard * This software is subject to the conditions detailed in the * LICENCE file provided in this distribution. */ @@ -23,6 +23,10 @@ #define socklen_t int #else /* #ifdef _WIN32 */ #include <unistd.h> +#include <sys/types.h> +#ifdef MINIUPNPC_SET_SOCKET_TIMEOUT +#include <sys/time.h> +#endif /* #ifdef MINIUPNPC_SET_SOCKET_TIMEOUT */ #include <sys/param.h> #include <sys/select.h> #include <errno.h> @@ -33,8 +37,8 @@ * during the connect() call */ #define MINIUPNPC_IGNORE_EINTR #ifndef USE_GETHOSTBYNAME -#include <sys/types.h> #include <sys/socket.h> +#include <sys/select.h> #endif /* #ifndef USE_GETHOSTBYNAME */ #endif /* #else _WIN32 */ @@ -112,7 +116,7 @@ int connecthostport(const char * host, unsigned short port, /* EINTR The system call was interrupted by a signal that was caught * EINPROGRESS The socket is nonblocking and the connection cannot * be completed immediately. */ - while(n < 0 && (errno == EINTR || errno = EINPROGRESS)) + while(n < 0 && (errno == EINTR || errno == EINPROGRESS)) { socklen_t len; fd_set wset; |