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'.
```
This commit is contained in:
Michael Vetter
2020-07-08 12:53:25 +02:00
parent ed75087e44
commit f33c4b6ba9

View File

@@ -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)
{