aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd/daemon.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/microhttpd/daemon.c')
-rw-r--r--src/microhttpd/daemon.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index c4ea8d0b..3e2d9109 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -4990,8 +4990,11 @@ MHD_start_daemon_va (unsigned int flags,
4990 /* Apply the socket options according to listening_address_reuse. */ 4990 /* Apply the socket options according to listening_address_reuse. */
4991 if (0 == daemon->listening_address_reuse) 4991 if (0 == daemon->listening_address_reuse)
4992 { 4992 {
4993 /* No user requirement, use "traditional" default SO_REUSEADDR, 4993#ifndef _WIN32
4994 and do not fail if it doesn't work */ 4994 /* No user requirement, use "traditional" default SO_REUSEADDR
4995 * on non-W32 platforms, and do not fail if it doesn't work.
4996 * Don't use it on W32, because on W32 it will allow multiple
4997 * bind to the same address:port, like SO_REUSEPORT on others. */
4995 if (0 > setsockopt (socket_fd, 4998 if (0 > setsockopt (socket_fd,
4996 SOL_SOCKET, 4999 SOL_SOCKET,
4997 SO_REUSEADDR, 5000 SO_REUSEADDR,
@@ -5003,6 +5006,7 @@ MHD_start_daemon_va (unsigned int flags,
5003 MHD_socket_last_strerr_ ()); 5006 MHD_socket_last_strerr_ ());
5004#endif 5007#endif
5005 } 5008 }
5009#endif /* ! _WIN32 */
5006 } 5010 }
5007 else if (daemon->listening_address_reuse > 0) 5011 else if (daemon->listening_address_reuse > 0)
5008 { 5012 {