journal-gateway: use MHD_USE_POLL_INTERNAL_THREAD instead of MHD_USE_POLL
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 28 Jul 2017 04:21:34 +0000 (13:21 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 28 Jul 2017 04:37:10 +0000 (13:37 +0900)
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
src/journal-remote/microhttpd-util.h

index e75edce12742862617edd9875b99da3ab7cd5fb4..63261bfa6c5c4b222cc779740f96511448604bbf 100644 (file)
@@ -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)
index 0e669aa1ad66dec767f5141a7db779a3b8d400e2..8112851b16b23210490834cb8a074511e714321f 100644 (file)
 #  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 */