``` LD (gcc) [M memcached.so] memcached.so CC (gcc) [M microhttpd.so] microhttpd_mod.o microhttpd_mod.c:374:24: error: return type is an incomplete type static enum MHD_Result ksr_microhttpd_request(void *cls, ^~~~~~~~~~~~~~~~~~~~~~ microhttpd_mod.c: In function 'ksr_microhttpd_request': microhttpd_mod.c:390:10: warning: 'return' with a value, in function returning void return MHD_YES; ^~~~~~~ microhttpd_mod.c:374:24: note: declared here static enum MHD_Result ksr_microhttpd_request(void *cls, ^~~~~~~~~~~~~~~~~~~~~~ microhttpd_mod.c:411:10: warning: 'return' with a value, in function returning void return MHD_NO; ^~~~~~ microhttpd_mod.c:374:24: note: declared here static enum MHD_Result ksr_microhttpd_request(void *cls, ^~~~~~~~~~~~~~~~~~~~~~ microhttpd_mod.c:433:10: warning: 'return' with a value, in function returning void return MHD_NO; ^~~~~~ microhttpd_mod.c:374:24: note: declared here static enum MHD_Result ksr_microhttpd_request(void *cls, ^~~~~~~~~~~~~~~~~~~~~~ microhttpd_mod.c:436:9: warning: 'return' with a value, in function returning void return MHD_YES; ^~~~~~~ microhttpd_mod.c:374:24: note: declared here static enum MHD_Result ksr_microhttpd_request(void *cls, ^~~~~~~~~~~~~~~~~~~~~~ microhttpd_mod.c: In function 'microhttpd_server_run': microhttpd_mod.c:462:17: warning: passing argument 5 of 'MHD_start_daemon' from incompatible pointer type [-Wincompatible-p ointer-types] NULL, NULL, &ksr_microhttpd_request, KSR_MICROHTTPD_PAGE, ^~~~~~~~~~~~~~~~~~~~~~~ In file included from microhttpd_mod.c:29: /usr/include/microhttpd.h:2148:1: note: expected 'MHD_AccessHandlerCallback' {aka 'int (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, long unsigned int *, void **)'} but argument is of type 'void (*)( void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, size_t *, void **)' {aka 'void (*) (void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, long unsigned int *, void **)'} MHD_start_daemon (unsigned int flags, ^~~~~~~~~~~~~~~~ microhttpd_mod.c:467:17: warning: passing argument 5 of 'MHD_start_daemon' from incompatible pointer type [-Wincompatible-p ointer-types] NULL, NULL, &ksr_microhttpd_request, KSR_MICROHTTPD_PAGE, ^~~~~~~~~~~~~~~~~~~~~~~ In file included from microhttpd_mod.c:29: /usr/include/microhttpd.h:2148:1: note: expected 'MHD_AccessHandlerCallback' {aka 'int (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, long unsigned int *, void **)'} but argument is of type 'void (*)( void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, size_t *, void **)' {aka 'void (*) (void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, long unsigned int *, void **)'} MHD_start_daemon (unsigned int flags, ^~~~~~~~~~~~~~~~ make[2]: *** [../../Makefile.rules:100: microhttpd_mod.o] Error 1 make[1]: Leaving directory '/root/rpmbuild/BUILD/kamailio-5.8.0-dev1/src' make[1]: *** [Makefile:508: modules] Error 1 make: *** [Makefile:34: every-module] Error 2 error: Bad exit status from /var/tmp/rpm-tmp.K7wkd7 (%build) Bad exit status from /var/tmp/rpm-tmp.K7wkd7 (%build) ```
It has probably an older version of libmicrohttpd library, there is no plan to support older distros, also for debian/ubuntu the packaging of microhttpd module has been disabled for old distro versions.
Just skip packaging this module on distro where its compilation fails.
Closed #3504 as completed.
My solution to this was to build the microhttpd package from https://github.com/Karlson2k/libmicrohttpd.git and then replace the existing microhttpd.h file from the distro with the built one. Then I could compile without errors This was done on a raspberry pi