From 3e8dfe6f2a4317c4cab3d5afec42abdefa3cc2df Mon Sep 17 00:00:00 2001
From: Jean-Philippe Orsini <orsinije@fr.ibm.com>
Date: Fri, 17 Jul 2020 00:10:54 +0200
Subject: [PATCH 1/7] fix compilation with microhttpd since version 0.9.71
 which changes the return type of the cbk

--- psensor-1.1.5.orig/src/server/server.c
+++ psensor-1.1.5/src/server/server.c
@@ -281,13 +281,18 @@ create_response(const char *nurl, const
 					       MHD_RESPMEM_MUST_FREE);
 }
 
-static int cbk_http_request(void *cls,
-			    struct MHD_Connection *connection,
-			    const char *url,
-			    const char *method,
-			    const char *version,
-			    const char *upload_data,
-			    size_t *upload_data_size, void **ptr)
+#if MHD_VERSION < 0x00097002
+static int
+#else
+static enum MHD_Result
+#endif
+cbk_http_request(void *cls,
+		 struct MHD_Connection *connection,
+		 const char *url,
+		 const char *method,
+		 const char *version,
+		 const char *upload_data,
+		 size_t *upload_data_size, void **ptr)
 {
 	static int dummy;
 	struct MHD_Response *response;
