Browse Source

Fixed compatibility with platforms without poll()

Evgeny Grin (Karlson2k) 8 năm trước cách đây
mục cha
commit
4a4e93fb5a
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  1. 2 0
      src/microhttpd/daemon.c

+ 2 - 0
src/microhttpd/daemon.c

@@ -814,6 +814,7 @@ urh_from_fdset (struct MHD_UpgradeResponseHandle *urh,
     }
     }
 }
 }
 
 
+#ifdef HAVE_POLL
 
 
 /**
 /**
  * Set required 'event' members in 'pollfd' elements,
  * Set required 'event' members in 'pollfd' elements,
@@ -904,6 +905,7 @@ urh_from_pollfd(struct MHD_UpgradeResponseHandle *urh,
   if (0 != (p[1].revents & MHD_POLL_REVENTS_ERRROR))
   if (0 != (p[1].revents & MHD_POLL_REVENTS_ERRROR))
     urh->mhd.celi |= MHD_EPOLL_STATE_READ_READY | MHD_EPOLL_STATE_WRITE_READY;
     urh->mhd.celi |= MHD_EPOLL_STATE_READ_READY | MHD_EPOLL_STATE_WRITE_READY;
 }
 }
+#endif /* HAVE_POLL */
 #endif /* HTTPS_SUPPORT && UPGRADE_SUPPORT */
 #endif /* HTTPS_SUPPORT && UPGRADE_SUPPORT */