aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd/test_upgrade.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/microhttpd/test_upgrade.c')
-rw-r--r--src/microhttpd/test_upgrade.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/microhttpd/test_upgrade.c b/src/microhttpd/test_upgrade.c
index 06dac795..fe72a70f 100644
--- a/src/microhttpd/test_upgrade.c
+++ b/src/microhttpd/test_upgrade.c
@@ -888,6 +888,7 @@ run_mhd_select_loop (struct MHD_Daemon *daemon)
888 } 888 }
889} 889}
890 890
891#ifdef HAVE_POLL
891 892
892/** 893/**
893 * Run the MHD external event loop using select. 894 * Run the MHD external event loop using select.
@@ -899,8 +900,10 @@ run_mhd_poll_loop (struct MHD_Daemon *daemon)
899{ 900{
900 abort (); /* currently not implementable with existing MHD API */ 901 abort (); /* currently not implementable with existing MHD API */
901} 902}
903#endif /* HAVE_POLL */
902 904
903 905
906#ifdef EPOLL_SUPPORT
904/** 907/**
905 * Run the MHD external event loop using select. 908 * Run the MHD external event loop using select.
906 * 909 *
@@ -938,7 +941,7 @@ run_mhd_epoll_loop (struct MHD_Daemon *daemon)
938 MHD_run (daemon); 941 MHD_run (daemon);
939 } 942 }
940} 943}
941 944#endif /* EPOLL_SUPPORT */
942 945
943/** 946/**
944 * Run the MHD external event loop using select. 947 * Run the MHD external event loop using select.
@@ -949,14 +952,16 @@ static void
949run_mhd_loop (struct MHD_Daemon *daemon, 952run_mhd_loop (struct MHD_Daemon *daemon,
950 int flags) 953 int flags)
951{ 954{
952 if (0 != (flags & MHD_USE_POLL)) 955 if (0 == (flags & (MHD_USE_POLL | MHD_USE_EPOLL)))
956 run_mhd_select_loop (daemon);
957#ifdef HAVE_POLL
958 else if (0 != (flags & MHD_USE_POLL))
953 run_mhd_poll_loop (daemon); 959 run_mhd_poll_loop (daemon);
960#endif /* HAVE_POLL */
954#if EPOLL_SUPPORT 961#if EPOLL_SUPPORT
955 else if (0 != (flags & MHD_USE_EPOLL)) 962 else if (0 != (flags & MHD_USE_EPOLL))
956 run_mhd_epoll_loop (daemon); 963 run_mhd_epoll_loop (daemon);
957#endif 964#endif
958 else if (0 == (flags & (MHD_USE_POLL | MHD_USE_EPOLL)))
959 run_mhd_select_loop (daemon);
960 else 965 else
961 abort (); 966 abort ();
962} 967}