aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pacredir.c2
-rw-r--r--pacredir.h9
2 files changed, 9 insertions, 2 deletions
diff --git a/pacredir.c b/pacredir.c
index 1f16804..2fa806f 100644
--- a/pacredir.c
+++ b/pacredir.c
@@ -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,
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,