File: 14.patch

package info (click to toggle)
psensor 1.1.5-1.3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 3,708 kB
  • sloc: javascript: 14,980; ansic: 7,203; sh: 4,979; perl: 3,922; makefile: 335; xml: 210; sed: 16
file content (34 lines) | stat: -rw-r--r-- 1,050 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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;