diff -Naur systemd-242/src/journal-remote/journal-gatewayd.c systemd-242-p/src/journal-remote/journal-gatewayd.c --- systemd-242/src/journal-remote/journal-gatewayd.c 2019-04-11 18:28:36.000000000 +0200 +++ systemd-242-p/src/journal-remote/journal-gatewayd.c 2021-03-06 23:15:30.278997272 +0100 @@ -350,7 +350,7 @@ return 0; } -static int request_parse_arguments_iterator( +static mhd_result request_parse_arguments_iterator( void *cls, enum MHD_ValueKind kind, const char *key, @@ -797,7 +797,7 @@ return MHD_queue_response(connection, MHD_HTTP_OK, response); } -static int request_handler( +static mhd_result request_handler( void *cls, struct MHD_Connection *connection, const char *url, diff -Naur systemd-242/src/journal-remote/journal-remote-main.c systemd-242-p/src/journal-remote/journal-remote-main.c --- systemd-242/src/journal-remote/journal-remote-main.c 2019-04-11 18:28:36.000000000 +0200 +++ systemd-242-p/src/journal-remote/journal-remote-main.c 2021-03-06 23:12:42.843943029 +0100 @@ -252,7 +252,7 @@ return mhd_respond(connection, MHD_HTTP_ACCEPTED, "OK."); }; -static int request_handler( +static mhd_result request_handler( void *cls, struct MHD_Connection *connection, const char *url, diff -Naur systemd-242/src/journal-remote/microhttpd-util.h systemd-242-p/src/journal-remote/microhttpd-util.h --- systemd-242/src/journal-remote/microhttpd-util.h 2019-04-11 18:28:36.000000000 +0200 +++ systemd-242-p/src/journal-remote/microhttpd-util.h 2021-03-06 23:11:16.219397231 +0100 @@ -47,6 +47,13 @@ # define MHD_create_response_from_fd_at_offset64 MHD_create_response_from_fd_at_offset #endif +#if MHD_VERSION >= 0x00097002 +# define mhd_result enum MHD_Result +#else +# define mhd_result int +#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. */