diff options
-rw-r--r-- | src/microhttpd/daemon.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c index 7f0a1cdf..ef002eea 100644 --- a/src/microhttpd/daemon.c +++ b/src/microhttpd/daemon.c | |||
@@ -1878,12 +1878,13 @@ make_nonblocking_noninheritable (struct MHD_Daemon *daemon, | |||
1878 | #endif | 1878 | #endif |
1879 | flags = fcntl (sock, F_GETFD); | 1879 | flags = fcntl (sock, F_GETFD); |
1880 | if ( ( (-1 == flags) || | 1880 | if ( ( (-1 == flags) || |
1881 | ( (flags != (flags | FD_CLOEXEC)) && | 1881 | ( (flags != (flags | nonblock | FD_CLOEXEC)) && |
1882 | (0 != fcntl (sock, F_SETFD, flags | nonblock | FD_CLOEXEC)) ) ) ) | 1882 | (0 != fcntl (sock, F_SETFD, flags | nonblock | FD_CLOEXEC)) ) ) ) |
1883 | { | 1883 | { |
1884 | #ifdef HAVE_MESSAGES | 1884 | #ifdef HAVE_MESSAGES |
1885 | MHD_DLOG (daemon, | 1885 | MHD_DLOG (daemon, |
1886 | "Failed to make socket non-inheritable: %s\n", | 1886 | "Failed to make socket %snon-inheritable: %s\n", |
1887 | ((nonblock) ? "non-blocking " : ""), | ||
1887 | MHD_socket_last_strerr_ ()); | 1888 | MHD_socket_last_strerr_ ()); |
1888 | #endif | 1889 | #endif |
1889 | } | 1890 | } |