gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [libmicrohttpd] 03/05: Properly handle port detection if AF


From: gnunet
Subject: [GNUnet-SVN] [libmicrohttpd] 03/05: Properly handle port detection if AF_UNIX socket is used on *BSD, macOS
Date: Sun, 02 Jun 2019 18:20:48 +0200

This is an automated email from the git hooks/post-receive script.

karlson2k pushed a commit to branch master
in repository libmicrohttpd.

commit 20eceebc77378727c836f846f8432d20c0ec4ac7
Author: Evgeny Grin (Karlson2k) <address@hidden>
AuthorDate: Sat Jun 1 22:51:50 2019 +0300

    Properly handle port detection if AF_UNIX socket is used on *BSD, macOS
---
 src/microhttpd/daemon.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index 7d186025..a5051c01 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -6124,6 +6124,14 @@ MHD_start_daemon_va (unsigned int flags,
                     _("Failed to get listen port number (`struct 
sockaddr_storage` too small!?)\n"));
 #endif /* HAVE_MESSAGES */
         }
+#ifndef __linux__
+      else if (0 == addrlen)
+        {
+          /* Many non-Linux-based platforms return zero addrlen
+           * for AF_UNIX sockets */
+          daemon->port = 0; /* special value for UNIX domain sockets */
+        }
+#endif /* __linux__ */
 #endif /* MHD_POSIX_SOCKETS */
       else
         {

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]