summaryrefslogtreecommitdiff
path: root/src/journal-remote/microhttpd-util.h
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-01-15 14:13:12 -0500
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-01-18 15:21:28 -0500
commitce7229a224228bb996f50181d09757406891e3d6 (patch)
tree6007c35a6657ca4ad0a01ee5baed4c65eaa6336a /src/journal-remote/microhttpd-util.h
parent555f5cdc2d437ac454cb83a9dee5e3f30be7ab0d (diff)
journal-remote: fix warning about deprecated µhttpd macro
src/journal-remote/journal-remote.c:590:13: warning: Value MHD_HTTP_METHOD_NOT_ACCEPTABLE is deprecated, use MHD_HTTP_NOT_ACCEPTABLE return mhd_respond(connection, MHD_HTTP_METHOD_NOT_ACCEPTABLE, ^ The new define was added in 0.9.38. Instead of requiring the new libmicrohttpd version, provide the fallback, it is trivial.
Diffstat (limited to 'src/journal-remote/microhttpd-util.h')
-rw-r--r--src/journal-remote/microhttpd-util.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/journal-remote/microhttpd-util.h b/src/journal-remote/microhttpd-util.h
index 3e8c4fa6d1..9b56434cba 100644
--- a/src/journal-remote/microhttpd-util.h
+++ b/src/journal-remote/microhttpd-util.h
@@ -26,6 +26,11 @@
#include "macro.h"
+/* Compatiblity with libmicrohttpd < 0.9.38 */
+#ifndef MHD_HTTP_NOT_ACCEPTABLE
+#define MHD_HTTP_NOT_ACCEPTABLE MHD_HTTP_METHOD_NOT_ACCEPTABLE
+#endif
+
void microhttpd_logger(void *arg, const char *fmt, va_list ap) _printf_(2, 0);
/* respond_oom() must be usable with return, hence this form. */