diff options
author | Riccardo Spagni <ric@spagni.net> | 2015-12-30 12:28:03 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2015-12-30 12:28:03 +0200 |
commit | 7223eebbe71833e895fca95267cb243834dedf83 (patch) | |
tree | a5d48783316ff837e353c51a29b54f5324dd0bb1 /external/miniupnpc/connecthostport.c | |
parent | Merge pull request #575 (diff) | |
parent | no longer need to pass the size to rapidjson (diff) | |
download | monero-7223eebbe71833e895fca95267cb243834dedf83.tar.xz |
Merge pull request #577
32a2633 no longer need to pass the size to rapidjson (Riccardo Spagni)
bd8e0fd add missing miniupnpc files, modify cmake to not build miniupnpc tests and to fix an issue with finding miniupnpcstrings (Riccardo Spagni)
7da9905 updated miniupnpc (Riccardo Spagni)
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; |