diff --git a/miniupnpc/Makefile b/miniupnpc/Makefile index 5065b91..80e7822 100644 --- a/miniupnpc/Makefile +++ b/miniupnpc/Makefile @@ -38,9 +38,11 @@ CFLAGS += -DMINIUPNPC_GET_SRC_ADDR CFLAGS += -D_BSD_SOURCE CFLAGS += -D_DEFAULT_SOURCE ifneq ($(OS), FreeBSD) +ifneq ($(OS), Darwin) #CFLAGS += -D_POSIX_C_SOURCE=200112L CFLAGS += -D_XOPEN_SOURCE=600 endif +endif #CFLAGS += -ansi # -DNO_GETADDRINFO INSTALL = install diff --git a/miniupnpc/connecthostport.c b/miniupnpc/connecthostport.c index d66ae31..b9a3bec 100644 --- a/miniupnpc/connecthostport.c +++ b/miniupnpc/connecthostport.c @@ -23,6 +23,10 @@ #define socklen_t int #else /* #ifdef _WIN32 */ #include +#include +#ifdef MINIUPNPC_SET_SOCKET_TIMEOUT +#include +#endif /* #ifdef MINIUPNPC_SET_SOCKET_TIMEOUT */ #include #include #include @@ -33,7 +37,6 @@ * during the connect() call */ #define MINIUPNPC_IGNORE_EINTR #ifndef USE_GETHOSTBYNAME -#include #include #include #endif /* #ifndef USE_GETHOSTBYNAME */