From 89ad5e67791f947ea6a13c83dbdd0bc02184b231 Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Mon, 28 Oct 2013 14:01:11 -0200 Subject: [PATCH] Fix compilation on GNU/Hurd --- ChangeLog | 4 ++++ THANKS | 1 + threadutil/inc/ithread.h | 2 +- upnp/src/ssdp/ssdp_server.c | 6 +++--- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index bc14157..922a699 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,10 @@ Version 1.6.19 ******************************************************************************* +2013-10-28 Pino Toscano + + Fix compilation on GNU/Hurd + 2013-10-28 Peng Fix return value of http_RecvPostMessage and update httpparser.c's comments diff --git a/THANKS b/THANKS index 1ea8e36..4aa17ce 100644 --- a/THANKS +++ b/THANKS @@ -56,6 +56,7 @@ exempt of errors. - Paul Vixie - Peng - Peter Hartley +- Pino Toscano (pinotree) - Rene Hexel - Robert Buckley (rbuckley) - Robert Gingher (robsbox) diff --git a/threadutil/inc/ithread.h b/threadutil/inc/ithread.h index e9456ac..51dec86 100644 --- a/threadutil/inc/ithread.h +++ b/threadutil/inc/ithread.h @@ -50,7 +50,7 @@ extern "C" { #include -#if defined(BSD) +#if defined(BSD) && !defined(__GNU__) #define PTHREAD_MUTEX_RECURSIVE_NP PTHREAD_MUTEX_RECURSIVE #endif diff --git a/upnp/src/ssdp/ssdp_server.c b/upnp/src/ssdp/ssdp_server.c index 8a57d08..293e79a 100644 --- a/upnp/src/ssdp/ssdp_server.c +++ b/upnp/src/ssdp/ssdp_server.c @@ -814,7 +814,7 @@ static int create_ssdp_sock_v4( ret = UPNP_E_SOCKET_ERROR; goto error_handler; } -#if defined(BSD) || defined(__OSX__) || defined(__APPLE__) +#if (defined(BSD) && !defined(__GNU__)) || defined(__OSX__) || defined(__APPLE__) onOff = 1; ret = setsockopt(*ssdpSock, SOL_SOCKET, SO_REUSEPORT, (char *)&onOff, sizeof(onOff)); @@ -956,7 +956,7 @@ static int create_ssdp_sock_v6( ret = UPNP_E_SOCKET_ERROR; goto error_handler; } -#if defined(BSD) || defined(__OSX__) || defined(__APPLE__) +#if (defined(BSD) && !defined(__GNU__)) || defined(__OSX__) || defined(__APPLE__) onOff = 1; ret = setsockopt(*ssdpSock, SOL_SOCKET, SO_REUSEPORT, (char *)&onOff, sizeof(onOff)); @@ -1069,7 +1069,7 @@ static int create_ssdp_sock_v6_ula_gua( ret = UPNP_E_SOCKET_ERROR; goto error_handler; } -#if defined(BSD) || defined(__OSX__) || defined(__APPLE__) +#if (defined(BSD) && !defined(__GNU__)) || defined(__OSX__) || defined(__APPLE__) onOff = 1; ret = setsockopt(*ssdpSock, SOL_SOCKET, SO_REUSEPORT, (char *)&onOff, sizeof(onOff));