]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
microhttpd-util: silence warnings about deprecated options
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 27 Jan 2017 05:15:07 +0000 (00:15 -0500)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 31 Jan 2017 19:04:55 +0000 (14:04 -0500)
src/journal-remote/journal-gatewayd.c
src/journal-remote/journal-remote.c
src/journal-remote/microhttpd-util.h

index 8ad9738edf41a80b336e3c94e2b7e4c7fd55454f..b7c4257f4963c4bba7dd2b34b7eabd3ea94edd23 100644 (file)
@@ -1028,10 +1028,9 @@ int main(int argc, char *argv[]) {
                         { MHD_OPTION_END, 0, NULL }};
                 int opts_pos = 2;
 
-                /* We force MHD_USE_PIPE_FOR_SHUTDOWN here, in order
-                 * to make sure libmicrohttpd doesn't use shutdown()
-                 * on our listening socket, which would break socket
-                 * re-activation. See
+                /* We force MHD_USE_ITC here, in order to make sure
+                 * libmicrohttpd doesn't use shutdown() on our listening
+                 * socket, which would break socket re-activation. See
                  *
                  * https://lists.gnu.org/archive/html/libmicrohttpd/2015-09/msg00014.html
                  * https://github.com/systemd/systemd/pull/1286
@@ -1040,7 +1039,7 @@ int main(int argc, char *argv[]) {
                 int flags =
                         MHD_USE_DEBUG |
                         MHD_USE_DUAL_STACK |
-                        MHD_USE_PIPE_FOR_SHUTDOWN |
+                        MHD_USE_ITC |
                         MHD_USE_POLL |
                         MHD_USE_THREAD_PER_CONNECTION;
 
index d86c3681b197447246253b2f1f93910a63c4c1e0..d0d8d936e3333e44b4c18137dd84546f2f4c1f9c 100644 (file)
@@ -648,9 +648,9 @@ static int setup_microhttpd_server(RemoteServer *s,
         int flags =
                 MHD_USE_DEBUG |
                 MHD_USE_DUAL_STACK |
-                MHD_USE_EPOLL_LINUX_ONLY |
+                MHD_USE_EPOLL |
                 MHD_USE_PEDANTIC_CHECKS |
-                MHD_USE_PIPE_FOR_SHUTDOWN;
+                MHD_USE_ITC;
 
         const union MHD_DaemonInfo *info;
         int r, epoll_fd;
index af26ab69fe171bda645af5d11dc1565bbc90727b..49def4f630f5ade05b047147ac1c70d69c5d66ee 100644 (file)
 
 #include "macro.h"
 
+/* Those defines are added when options are renamed, hence the check for the *old* name. */
+
 /* Compatiblity with libmicrohttpd < 0.9.38 */
 #ifndef MHD_HTTP_NOT_ACCEPTABLE
-#define MHD_HTTP_NOT_ACCEPTABLE MHD_HTTP_METHOD_NOT_ACCEPTABLE
+#  define MHD_HTTP_NOT_ACCEPTABLE MHD_HTTP_METHOD_NOT_ACCEPTABLE
+#endif
+
+/* Renamed in µhttpd 0.9.52 */
+#ifndef MHD_USE_EPOLL_LINUX_ONLY
+#  define MHD_USE_EPOLL MHD_USE_EPOLL_LINUX_ONLY
+#endif
+
+/* Renamed in µhttpd 0.9.51 */
+#ifndef MHD_USE_PIPE_FOR_SHUTDOWN
+#  define MHD_USE_ITC MHD_USE_PIPE_FOR_SHUTDOWN
 #endif
 
 #if MHD_VERSION < 0x00094203
-#define MHD_create_response_from_fd_at_offset64 MHD_create_response_from_fd_at_offset
+#  define MHD_create_response_from_fd_at_offset64 MHD_create_response_from_fd_at_offset
 #endif
 
 void microhttpd_logger(void *arg, const char *fmt, va_list ap) _printf_(2, 0);