From f33c4b6ba9281d1e5ff7c488cc0df00e331c98ba Mon Sep 17 00:00:00 2001 From: Michael Vetter Date: Wed, 8 Jul 2020 12:53:25 +0200 Subject: [PATCH] Adapt libmicrohttpd types Profanity Travis CI showed that stabber doesn't build anymore on Debian Testing, Arch Linux and Fedora. It appears all these systems have updated to libmicrohttpd 0.9.71 recently. Earlier versions build fine. See release announcement: https://lists.gnu.org/archive/html/libmicrohttpd/2020-06/msg00013.html ``` Furthermore, the release introduces an 'enum MHD_Result' instead of for certain API misuse bugs by providing better types (not everything is an 'int'). While this does NOT change the binary API, this change _will_ cause compiler warnings for all legacy code -- until 'int' is replaced with 'enum MHD_Result'. ``` --- src/server/httpapi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/server/httpapi.c b/src/server/httpapi.c index 0bbe68d..e12140a 100644 --- a/src/server/httpapi.c +++ b/src/server/httpapi.c @@ -76,7 +76,7 @@ destroy_connection_info(ConnectionInfo *con_info) free(con_info); } -int +enum MHD_Result send_response(struct MHD_Connection* conn, const char* body, int status_code) { struct MHD_Response* response; @@ -96,7 +96,7 @@ send_response(struct MHD_Connection* conn, const char* body, int status_code) return ret; } -int +enum MHD_Result connection_cb(void* cls, struct MHD_Connection* conn, const char* url, const char* method, const char* version, const char* data, size_t* size, void** con_cls) {