Skip to content
This repository was archived by the owner on Jun 17, 2026. It is now read-only.

Declare promhttp_handler with the correct return type#79

Open
wferi wants to merge 1 commit into
digitalocean:masterfrom
wferi:MHD_Result
Open

Declare promhttp_handler with the correct return type#79
wferi wants to merge 1 commit into
digitalocean:masterfrom
wferi:MHD_Result

Conversation

@wferi

@wferi wferi commented Apr 3, 2023

Copy link
Copy Markdown

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.

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 digitalocean#72.
@hiaochuan

Copy link
Copy Markdown

nice, it really helps!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Failing to compile client

2 participants