瀏覽代碼

Fixed build without poll()

Evgeny Grin (Karlson2k) 4 年之前
父節點
當前提交
4049caeb1c
共有 1 個文件被更改,包括 7 次插入1 次删除
  1. 7 1
      src/microhttpd/daemon.c

+ 7 - 1
src/microhttpd/daemon.c

@@ -5143,11 +5143,17 @@ MHD_run_wait (struct MHD_Daemon *daemon,
 
   if (0 > millisec)
     millisec = -1;
-  if (0 != (daemon->options & MHD_USE_POLL))
+  if (false)
+  {
+    (void) 0; /* Mute compiler warning */
+  }
+#ifdef HAVE_POLL
+  else if (0 != (daemon->options & MHD_USE_POLL))
   {
     res = MHD_poll_all (daemon, millisec);
     MHD_cleanup_connections (daemon);
   }
+#endif /* HAVE_POLL */
 #ifdef EPOLL_SUPPORT
   else if (0 != (daemon->options & MHD_USE_EPOLL))
   {