|
|
04e329 |
From ca86de228e19cea268ec3eeabc9097d7c28fbf24 Mon Sep 17 00:00:00 2001
|
|
|
04e329 |
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
|
|
04e329 |
Date: Tue, 30 Jun 2020 09:56:10 +0200
|
|
|
04e329 |
Subject: [PATCH] =?UTF-8?q?Fix=20build=20with=20=C2=B5httpd=200.9.71?=
|
|
|
04e329 |
MIME-Version: 1.0
|
|
|
04e329 |
Content-Type: text/plain; charset=UTF-8
|
|
|
04e329 |
Content-Transfer-Encoding: 8bit
|
|
|
04e329 |
|
|
|
04e329 |
The return type of callbacks was changed from int to an enum.
|
|
|
04e329 |
|
|
|
04e329 |
(cherry picked from commit d17eabb1052e7c8c432331a7a782845e36164f01)
|
|
|
04e329 |
|
|
|
04e329 |
Related: #2122499
|
|
|
04e329 |
---
|
|
|
04e329 |
src/journal-remote/journal-gatewayd.c | 4 ++--
|
|
|
04e329 |
src/journal-remote/journal-remote-main.c | 2 +-
|
|
|
04e329 |
src/journal-remote/microhttpd-util.h | 6 ++++++
|
|
|
04e329 |
3 files changed, 9 insertions(+), 3 deletions(-)
|
|
|
04e329 |
|
|
|
04e329 |
diff --git a/src/journal-remote/journal-gatewayd.c b/src/journal-remote/journal-gatewayd.c
|
|
|
04e329 |
index 54446ff7b5..3ff05a4d72 100644
|
|
|
04e329 |
--- a/src/journal-remote/journal-gatewayd.c
|
|
|
04e329 |
+++ b/src/journal-remote/journal-gatewayd.c
|
|
|
04e329 |
@@ -338,7 +338,7 @@ static int request_parse_range(
|
|
|
04e329 |
return 0;
|
|
|
04e329 |
}
|
|
|
04e329 |
|
|
|
04e329 |
-static int request_parse_arguments_iterator(
|
|
|
04e329 |
+static mhd_result request_parse_arguments_iterator(
|
|
|
04e329 |
void *cls,
|
|
|
04e329 |
enum MHD_ValueKind kind,
|
|
|
04e329 |
const char *key,
|
|
|
04e329 |
@@ -795,7 +795,7 @@ static int request_handler_machine(
|
|
|
04e329 |
return MHD_queue_response(connection, MHD_HTTP_OK, response);
|
|
|
04e329 |
}
|
|
|
04e329 |
|
|
|
04e329 |
-static int request_handler(
|
|
|
04e329 |
+static mhd_result request_handler(
|
|
|
04e329 |
void *cls,
|
|
|
04e329 |
struct MHD_Connection *connection,
|
|
|
04e329 |
const char *url,
|
|
|
04e329 |
diff --git a/src/journal-remote/journal-remote-main.c b/src/journal-remote/journal-remote-main.c
|
|
|
04e329 |
index bcaa370099..a1008db6eb 100644
|
|
|
04e329 |
--- a/src/journal-remote/journal-remote-main.c
|
|
|
04e329 |
+++ b/src/journal-remote/journal-remote-main.c
|
|
|
04e329 |
@@ -241,7 +241,7 @@ static int process_http_upload(
|
|
|
04e329 |
return mhd_respond(connection, MHD_HTTP_ACCEPTED, "OK.");
|
|
|
04e329 |
};
|
|
|
04e329 |
|
|
|
04e329 |
-static int request_handler(
|
|
|
04e329 |
+static mhd_result request_handler(
|
|
|
04e329 |
void *cls,
|
|
|
04e329 |
struct MHD_Connection *connection,
|
|
|
04e329 |
const char *url,
|
|
|
04e329 |
diff --git a/src/journal-remote/microhttpd-util.h b/src/journal-remote/microhttpd-util.h
|
|
|
04e329 |
index dd0ca1d9bd..792c07ac20 100644
|
|
|
04e329 |
--- a/src/journal-remote/microhttpd-util.h
|
|
|
04e329 |
+++ b/src/journal-remote/microhttpd-util.h
|
|
|
04e329 |
@@ -51,6 +51,12 @@
|
|
|
04e329 |
# define MHD_create_response_from_fd_at_offset64 MHD_create_response_from_fd_at_offset
|
|
|
04e329 |
#endif
|
|
|
04e329 |
|
|
|
04e329 |
+#if MHD_VERSION >= 0x00097002
|
|
|
04e329 |
+# define mhd_result enum MHD_Result
|
|
|
04e329 |
+#else
|
|
|
04e329 |
+# define mhd_result int
|
|
|
04e329 |
+#endif
|
|
|
04e329 |
+
|
|
|
04e329 |
void microhttpd_logger(void *arg, const char *fmt, va_list ap) _printf_(2, 0);
|
|
|
04e329 |
|
|
|
04e329 |
/* respond_oom() must be usable with return, hence this form. */
|