diff options
-rw-r--r-- | src/include/microhttpd.h | 1 | ||||
-rw-r--r-- | src/microhttpd/daemon.c | 7 | ||||
-rw-r--r-- | src/microhttpd/internal.h | 1 |
3 files changed, 8 insertions, 1 deletions
diff --git a/src/include/microhttpd.h b/src/include/microhttpd.h index 9251a4bc..45476f9a 100644 --- a/src/include/microhttpd.h +++ b/src/include/microhttpd.h | |||
@@ -430,6 +430,7 @@ enum MHD_FLAG | |||
430 | * use of this option is automatic (as in, you do not even have to | 430 | * use of this option is automatic (as in, you do not even have to |
431 | * specify it), if 'MHD_USE_NO_LISTEN_SOCKET' is specified. In | 431 | * specify it), if 'MHD_USE_NO_LISTEN_SOCKET' is specified. In |
432 | * "external" select mode, this option is always simply ignored. | 432 | * "external" select mode, this option is always simply ignored. |
433 | * On W32 a pair of sockets is used instead of a pipe. | ||
433 | */ | 434 | */ |
434 | MHD_USE_PIPE_FOR_SHUTDOWN = 1024, | 435 | MHD_USE_PIPE_FOR_SHUTDOWN = 1024, |
435 | 436 | ||
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c index 02314aa7..5d3c47bb 100644 --- a/src/microhttpd/daemon.c +++ b/src/microhttpd/daemon.c | |||
@@ -2968,7 +2968,12 @@ MHD_start_daemon_va (unsigned int flags, | |||
2968 | if (0 == (flags & (MHD_USE_SELECT_INTERNALLY | MHD_USE_THREAD_PER_CONNECTION))) | 2968 | if (0 == (flags & (MHD_USE_SELECT_INTERNALLY | MHD_USE_THREAD_PER_CONNECTION))) |
2969 | use_pipe = 0; /* useless if we are using 'external' select */ | 2969 | use_pipe = 0; /* useless if we are using 'external' select */ |
2970 | if ( (use_pipe) && | 2970 | if ( (use_pipe) && |
2971 | (0 != PIPE (daemon->wpipe)) ) | 2971 | #ifdef WINDOWS |
2972 | (0 != SOCKETPAIR (AF_INET, SOCK_STREAM, IPPROTO_TCP, daemon->wpipe)) | ||
2973 | #else | ||
2974 | (0 != PIPE (daemon->wpipe)) | ||
2975 | #endif | ||
2976 | ) | ||
2972 | { | 2977 | { |
2973 | #if HAVE_MESSAGES | 2978 | #if HAVE_MESSAGES |
2974 | MHD_DLOG (daemon, | 2979 | MHD_DLOG (daemon, |
diff --git a/src/microhttpd/internal.h b/src/microhttpd/internal.h index 5c5605a7..7db85695 100644 --- a/src/microhttpd/internal.h +++ b/src/microhttpd/internal.h | |||
@@ -1073,6 +1073,7 @@ struct MHD_Daemon | |||
1073 | * Pipe we use to signal shutdown, unless | 1073 | * Pipe we use to signal shutdown, unless |
1074 | * 'HAVE_LISTEN_SHUTDOWN' is defined AND we have a listen | 1074 | * 'HAVE_LISTEN_SHUTDOWN' is defined AND we have a listen |
1075 | * socket (which we can then 'shutdown' to stop listening). | 1075 | * socket (which we can then 'shutdown' to stop listening). |
1076 | * On W32 this is a socketpair, not a pipe. | ||
1076 | */ | 1077 | */ |
1077 | int wpipe[2]; | 1078 | int wpipe[2]; |
1078 | 1079 | ||