digitalocean / prometheus-client-c

A Prometheus Client in C
Other
160 stars 79 forks source link

Declare promhttp_handler with the correct return type #79

Open wferi opened 1 year ago

wferi commented 1 year ago

The type of MHD_YES/NO changed in libmicrohttpd 0.9.70, so flexibility is needed for some time to avoid "incompatible pointer type" warning, which breaks the default build where warnings are treated as errors.

Furthermore the public declaration of promhttp_handler() is useful when the promhttpd_start_daemon() helper is not flexible enough and thus the library user has to invoke MHD_start_daemon() directly.

Fixes #72.