From 315629a83f6c46695ce7ff87c77ad493f1283172 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Fri, 28 Jul 2017 13:21:34 +0900 Subject: [PATCH] journal-gateway: use MHD_USE_POLL_INTERNAL_THREAD instead of MHD_USE_POLL The option MHD_USE_THREAD_PER_CONNECTION requires MHD_USE_POLL_INTERNAL_THREAD since libmicrohttpd-0.9.53. If MHD_USE_POLL is used instead of MHD_USE_POLL_INTERNAL_THREAD, then the library outputs the following warning: ``` Warning: MHD_USE_THREAD_PER_CONNECTION must be used only with MHD_USE_INTERNAL_POLLING_THREAD. Flag MHD_USE_INTERNAL_POLLING_THREAD was added. Consider setting MHD_USE_INTERNAL_POLLING_THREAD explicitly. ``` The option MHD_USE_POLL_INTERNAL_THREAD is defined as `MHD_USE_POLL_INTERNAL_THREAD = MHD_USE_POLL | MHD_USE_INTERNAL_POLLING_THREAD,` So, let's use MHD_USE_POLL_INTERNAL_THREAD instead of MHD_USE_POLL. --- src/journal-remote/journal-gatewayd.c | 2 +- src/journal-remote/microhttpd-util.h | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/journal-remote/journal-gatewayd.c b/src/journal-remote/journal-gatewayd.c index e75edce1274..63261bfa6c5 100644 --- a/src/journal-remote/journal-gatewayd.c +++ b/src/journal-remote/journal-gatewayd.c @@ -1041,7 +1041,7 @@ int main(int argc, char *argv[]) { MHD_USE_DEBUG | MHD_USE_DUAL_STACK | MHD_USE_ITC | - MHD_USE_POLL | + MHD_USE_POLL_INTERNAL_THREAD | MHD_USE_THREAD_PER_CONNECTION; if (n > 0) diff --git a/src/journal-remote/microhttpd-util.h b/src/journal-remote/microhttpd-util.h index 0e669aa1ad6..8112851b16b 100644 --- a/src/journal-remote/microhttpd-util.h +++ b/src/journal-remote/microhttpd-util.h @@ -46,6 +46,11 @@ # define MHD_USE_TLS MHD_USE_SSL #endif +/* Renamed in µhttpd 0.9.53 */ +#ifndef MHD_USE_POLL_INTERNALLY +# define MHD_USE_POLL_INTERNAL_THREAD MHD_USE_POLL_INTERNALLY +#endif + /* Both the old and new names are defines, check for the new one. */ /* Renamed in µhttpd 0.9.53 */