[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libmicrohttpd] 02/02: Muted compiler warning
From: |
gnunet |
Subject: |
[libmicrohttpd] 02/02: Muted compiler warning |
Date: |
Wed, 31 Jan 2024 00:54:21 +0100 |
This is an automated email from the git hooks/post-receive script.
karlson2k pushed a commit to branch master
in repository libmicrohttpd.
commit 54317e6e1fc7e814166bae6e18aed34780cad624
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Wed Jan 31 00:53:32 2024 +0100
Muted compiler warning
---
src/microhttpd/mhd_sockets.c | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/src/microhttpd/mhd_sockets.c b/src/microhttpd/mhd_sockets.c
index 0b348d83..f6da7452 100644
--- a/src/microhttpd/mhd_sockets.c
+++ b/src/microhttpd/mhd_sockets.c
@@ -523,13 +523,13 @@ MHD_socket_create_listen_ (int pf)
#if defined(MHD_POSIX_SOCKETS) && (defined(SOCK_CLOEXEC) || \
defined(SOCK_NOSIGPIPE) )
+ fd = socket (pf,
+ SOCK_STREAM | SOCK_CLOEXEC | SOCK_NOSIGPIPE_OR_ZERO,
+ 0);
cloexec_set = (SOCK_CLOEXEC_OR_ZERO != 0);
#if defined(SOCK_NOSIGPIPE) || defined(MHD_socket_nosignal_)
nosigpipe_set = (SOCK_NOSIGPIPE_OR_ZERO != 0);
#endif /* SOCK_NOSIGPIPE || MHD_socket_nosignal_ */
- fd = socket (pf,
- SOCK_STREAM | SOCK_CLOEXEC | SOCK_NOSIGPIPE_OR_ZERO,
- 0);
#elif defined(MHD_WINSOCK_SOCKETS) && defined(WSA_FLAG_NO_HANDLE_INHERIT)
fd = WSASocketW (pf,
SOCK_STREAM,
@@ -538,9 +538,13 @@ MHD_socket_create_listen_ (int pf)
0,
WSA_FLAG_OVERLAPPED | WSA_FLAG_NO_HANDLE_INHERIT);
cloexec_set = ! 0;
-#else /* !SOCK_CLOEXEC */
+#else /* No special socket init function / flags */
fd = MHD_INVALID_SOCKET;
-#endif /* !SOCK_CLOEXEC */
+ cloexec_set = 0;
+#if defined(SOCK_NOSIGPIPE) || defined(MHD_socket_nosignal_)
+ nosigpipe_set = 0;
+#endif /* SOCK_NOSIGPIPE || MHD_socket_nosignal_ */
+#endif /* No special socket init function / flags */
if (MHD_INVALID_SOCKET == fd)
{
fd = socket (pf,
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.