diff --git a/promhttp/src/promhttp.c b/promhttp/src/promhttp.c index d94a53e..857baa0 100644 --- a/promhttp/src/promhttp.c +++ b/promhttp/src/promhttp.c @@ -29,8 +29,13 @@ void promhttp_set_active_collector_registry(prom_collector_registry_t *active_re } } +#if MHD_VERSION >= 0x00097002 +enum MHD_Result promhttp_handler(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 **con_cls) { +#else int promhttp_handler(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 **con_cls) { +#endif if (strcmp(method, "GET") != 0) { char *buf = "Invalid HTTP Method\n"; struct MHD_Response *response = MHD_create_response_from_buffer(strlen(buf), (void *)buf, MHD_RESPMEM_PERSISTENT);