diff options
author | Christian Hesse <mail@eworm.de> | 2020-07-07 11:29:36 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2020-07-07 11:29:36 +0200 |
commit | f5482d8c6463c310a2b1bbab3ab3776155e16f93 (patch) | |
tree | 3ef20ad55be949a9d1415f93126135e25d53ed64 | |
parent | b7a3a11fac2c442bc6bf03c84880e246032ff974 (diff) | |
download | pacredir-f5482d8c6463c310a2b1bbab3ab3776155e16f93.tar.gz pacredir-f5482d8c6463c310a2b1bbab3ab3776155e16f93.tar.zst |
fix build with libmicrohttpd 0.9.71
-rw-r--r-- | pacredir.c | 2 | ||||
-rw-r--r-- | pacredir.h | 9 |
2 files changed, 9 insertions, 2 deletions
@@ -343,7 +343,7 @@ static void * get_http_code(void * data) { /*** ahc_echo *** * called whenever a http request is received */ -static int ahc_echo(void * cls, +static mhd_result ahc_echo(void * cls, struct MHD_Connection * connection, const char * uri, const char * method, @@ -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, |