From f5482d8c6463c310a2b1bbab3ab3776155e16f93 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 7 Jul 2020 11:29:36 +0200 Subject: fix build with libmicrohttpd 0.9.71 --- pacredir.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'pacredir.h') diff --git a/pacredir.h b/pacredir.h index d165ee8..a38eb9f 100644 --- a/pacredir.h +++ b/pacredir.h @@ -44,6 +44,13 @@ #define PROGNAME "pacredir" +/* libmicrohttpd compat */ +#if MHD_VERSION >= 0x00097002 +# define mhd_result enum MHD_Result +#else +# define mhd_result int +#endif + /* hosts */ struct hosts { /* host name */ @@ -130,7 +137,7 @@ static void client_callback(AvahiClient *c, /* get_http_code */ static void * get_http_code(void * data); /* ahc_echo */ -static int ahc_echo(void * cls, +static mhd_result ahc_echo(void * cls, struct MHD_Connection * connection, const char * uri, const char * method, -- cgit v1.2.3-54-g00ecf