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

Failing to compile client #72

Description

@Codent0101

Hi Guys,

I am failing to compile with the following error, my version of libmicrohttpd is 0.9.75.

I have tried a fresh compile of both on a clean machine and still running into the same issue, any having a similar experience?

[ 50%] Building C object CMakeFiles/promhttp.dir/src/promhttp.c.o
/home/jamieb/prometheus-client-c/promhttp/src/promhttp.c: In function ‘promhttp_start_daemon’:
/home/jamieb/prometheus-client-c/promhttp/src/promhttp.c:64:54: error: passing argument 5 of ‘MHD_start_daemon’ from incompatible pointer type [-Werror=incompatible-pointer-types]
   64 |   return MHD_start_daemon(flags, port, apc, apc_cls, &promhttp_handler, NULL, MHD_OPTION_END);
      |                                                      ^~~~~~~~~~~~~~~~~
      |                                                      |
      |                                                      int (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, size_t *, void **) {aka int (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, long unsigned int *, void **)}
In file included from /home/jamieb/prometheus-client-c/promhttp/src/promhttp.c:19:
/usr/local/include/microhttpd.h:2813:1: note: expected ‘MHD_AccessHandlerCallback’ {aka ‘enum MHD_Result (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, long unsigned int *, void **)’} but argument is of type ‘int (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, size_t *, void **)’ {aka ‘int (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, long unsigned int *, void **)’}
 2813 | MHD_start_daemon (unsigned int flags,
      | ^~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[2]: *** [CMakeFiles/promhttp.dir/build.make:63: CMakeFiles/promhttp.dir/src/promhttp.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/promhttp.dir/all] Error 2
make: *** [Makefile:152: all] Error 2
ERROR: promhttp Make Failure

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions