commit 912620e3f9870ecdf342bf1ce7dce284b601f616
parent 9816a8f598c00cf7ce9e1b23d32c6ef4cf7c44f7
Author: Christian Grothoff <christian@grothoff.org>
Date: Wed, 1 Feb 2012 08:40:41 +0000
BS: fixing compilation problem on MinGW
Diffstat:
3 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/AUTHORS b/AUTHORS
@@ -37,6 +37,7 @@ Will Bryant <will.bryant@gmail.com>
LRN <lrn1986@gmail.com>
Sven Geggus <sts@fuchsschwanzdomain.de>
Steve Wolf <stevewolf6@gmail.com>
+Brecht Sanders <brecht@sanders.org>
Documentation contributions also came from:
Marco Maggi <marco.maggi-ipsu@poste.it>
diff --git a/ChangeLog b/ChangeLog
@@ -1,3 +1,6 @@
+Wed Feb 1 09:39:12 CET 2012
+ Fixed compilation problem on MinGW. -BS
+
Tue Jan 31 17:50:24 CET 2012
Releasing 0.9.19. -CG
diff --git a/src/daemon/daemon.c b/src/daemon/daemon.c
@@ -956,6 +956,7 @@ MHD_add_connection (struct MHD_Daemon *daemon,
#endif
{
/* make socket non-blocking */
+#ifndef MINGW
int flags = fcntl (connection->socket_fd, F_GETFL);
if ( (flags == -1) ||
(0 != fcntl (connection->socket_fd, F_SETFL, flags | O_NONBLOCK)) )
@@ -965,6 +966,16 @@ MHD_add_connection (struct MHD_Daemon *daemon,
STRERROR (errno));
#endif
}
+#else
+ unsigned long flags = 1;
+ if (0 != ioctlsocket (connection->socket_fd, FIONBIO, &flags))
+#endif
+ {
+#if HAVE_MESSAGES
+ FPRINTF(stderr, "Failed to make socket non-blocking: %s\n",
+ STRERROR (errno));
+#endif
+ }
}
#if HTTPS_SUPPORT