From: Yu Watanabe Date: Fri, 28 Jul 2017 04:21:34 +0000 (+0900) Subject: journal-gateway: use MHD_USE_POLL_INTERNAL_THREAD instead of MHD_USE_POLL X-Git-Tag: v235~285^2~1 X-Git-Url: http://git-history.diyao.me/?a=commitdiff_plain;h=315629a83f6c46695ce7ff87c77ad493f1283172;p=systemd%2F.git 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. --- diff --git a/src/journal-remote/journal-gatewayd.c b/src/journal-remote/journal-gatewayd.c index e75edce127..63261bfa6c 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 0e669aa1ad..8112851b16 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 */