gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r37905 - libmicrohttpd/src/microhttpd


From: gnunet
Subject: [GNUnet-SVN] r37905 - libmicrohttpd/src/microhttpd
Date: Wed, 7 Sep 2016 18:39:15 +0200

Author: grothoff
Date: 2016-09-07 18:39:15 +0200 (Wed, 07 Sep 2016)
New Revision: 37905

Modified:
   libmicrohttpd/src/microhttpd/daemon.c
Log:
-fix FTBFS on platforms that don't have epoll()-support

Modified: libmicrohttpd/src/microhttpd/daemon.c
===================================================================
--- libmicrohttpd/src/microhttpd/daemon.c       2016-09-07 15:32:48 UTC (rev 
37904)
+++ libmicrohttpd/src/microhttpd/daemon.c       2016-09-07 16:39:15 UTC (rev 
37905)
@@ -933,6 +933,7 @@
   DLL_remove (daemon->urh_head,
               daemon->urh_tail,
               urh);
+#if EPOLL_SUPPORT
   if (0 != (daemon->options & MHD_USE_EPOLL))
     {
       /* epoll documentation suggests that closing a FD
@@ -947,6 +948,7 @@
                           NULL))
         MHD_PANIC (_("Failed to remove FD from epoll set\n"));
     }
+#endif
   if (MHD_INVALID_SOCKET != urh->mhd.socket)
     {
       /* epoll documentation suggests that closing a FD
@@ -955,6 +957,7 @@
          we are still seeing an event for this fd in epoll,
          causing grief (use-after-free...) --- at least on my
          system. */
+#if EPOLL_SUPPORT
       if ( (0 != (daemon->options & MHD_USE_EPOLL)) &&
            (0 != epoll_ctl (daemon->epoll_upgrade_fd,
                             EPOLL_CTL_DEL,
@@ -961,6 +964,7 @@
                             urh->mhd.socket,
                             NULL)) )
         MHD_PANIC (_("Failed to remove FD from epoll set\n"));
+#endif
       if (0 != MHD_socket_close_ (urh->mhd.socket))
         MHD_PANIC (_("close failed\n"));
     }
@@ -1574,7 +1578,8 @@
                         (MHD_SCKT_SEND_SIZE_) i,
                         MSG_NOSIGNAL);
 #ifdef EPOLL_SUPPORT
-  if ( (0 > ret) && (MHD_SCKT_ERR_IS_EAGAIN_ (MHD_socket_get_error_ ())) )
+  if ( (0 > ret) &&
+       (MHD_SCKT_ERR_IS_EAGAIN_ (MHD_socket_get_error_ ())) )
     {
       /* Got EAGAIN --- no longer read-ready */
       connection->epoll_state &= ~MHD_EPOLL_STATE_READ_READY;
@@ -5154,7 +5159,6 @@
        MHD_PANIC (_("Failed to remove FD from epoll set\n"));
       daemon->upgrade_fd_in_epoll = MHD_NO;
     }
-#endif
   if (-1 != daemon->epoll_fd)
     close (daemon->epoll_fd);
 #if HTTPS_SUPPORT
@@ -5162,6 +5166,7 @@
     close (daemon->epoll_upgrade_fd);
 #endif
 #endif
+#endif
 #ifdef DAUTH_SUPPORT
   free (daemon->nnc);
   (void) MHD_mutex_destroy_ (&daemon->nnc_lock);




reply via email to

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