I've tried to compile the latest stable version on MinGW-w64, but it raises the following error at build time (cut relevant parts only):
../../../src/microhttpd/daemon.c: In function 'thread_main_handle_connection':
../../../src/microhttpd/daemon.c:1781:17: error: array type has incomplete element type 'struct pollfd'
struct pollfd p[1 + EXTRA_SLOTS];
^
../../../src/microhttpd/daemon.c:1843:29: error: 'POLLIN' undeclared (first use in this function); did you mean 'POINT'?
p[0].events = POLLIN;
^~~~~~
POINT
../../../src/microhttpd/daemon.c:1843:29: note: each undeclared identifier is reported only once for each function it appears in
In file included from ../../../src/microhttpd/internal.h:72:0,
from ../../../src/microhttpd/daemon.c:32:
../../../src/microhttpd/mhd_sockets.h:340:27: warning: implicit declaration of function 'WSAPoll'; did you mean 'WSANtohl'? [-Wimplicit-function-declaration]
# define MHD_sys_poll_ WSAPoll
^
../../../src/microhttpd/daemon.c:1846:23: note: in expansion of macro 'MHD_sys_poll_'
if (0 > MHD_sys_poll_ (p,
^~~~~~~~~~~~~
../../../src/microhttpd/mhd_sockets.h:362:38: error: 'POLLRDBAND' undeclared (first use in this function); did you mean 'POLLIN'?
# define MHD_POLL_EVENTS_ERR_DISC POLLRDBAND
^
../../../src/microhttpd/daemon.c:2012:32: note: in expansion of macro 'MHD_POLL_EVENTS_ERR_DISC'
p[0].events |= POLLIN | MHD_POLL_EVENTS_ERR_DISC;
^~~~~~~~~~~~~~~~~~~~~~~~
../../../src/microhttpd/daemon.c:2015:23: error: 'POLLOUT' undeclared (first use in this function); did you mean 'POLLIN'?
p[0].events |= POLLOUT | MHD_POLL_EVENTS_ERR_DISC;
^~~~~~~
POLLIN
../../../src/microhttpd/daemon.c:2055:39: error: 'POLLERR' undeclared (first use in this function); did you mean 'POLLOUT'?
(0 != (p[1].revents & (POLLERR | POLLHUP | POLLIN))) )
^~~~~~~
POLLOUT
../../../src/microhttpd/daemon.c:2055:49: error: 'POLLHUP' undeclared (first use in this function); did you mean 'POLLOUT'?
(0 != (p[1].revents & (POLLERR | POLLHUP | POLLIN))) )
^~~~~~~
POLLOUT
In file included from ../../../src/microhttpd/daemon.c:44:0:
../../../src/microhttpd/daemon.c: In function 'MHD_poll_all':
../../../src/microhttpd/daemon.c:3736:30: error: invalid application of 'sizeof' to incomplete type 'struct pollfd'
sizeof (struct pollfd));
^
../../../src/microhttpd/mhd_compat.h:79:38: note: in definition of macro 'MHD_calloc_'
#define MHD_calloc_(n,s) calloc((n),(s))
^
../../../src/microhttpd/daemon.c:3754:3: error: invalid use of undefined type 'struct pollfd'
p[poll_server].fd = ls;
^
../../../src/microhttpd/daemon.c:3754:3: error: dereferencing pointer to incomplete type 'struct pollfd'
../../../src/microhttpd/daemon.c:3755:3: error: invalid use of undefined type 'struct pollfd'
p[poll_server].events = POLLIN;
^
../../../src/microhttpd/daemon.c:3755:26: error: 'POLLIN' undeclared (first use in this function); did you mean 'POINT'?
p[poll_server].events = POLLIN;
^~~~~~
POINT
../../../src/microhttpd/daemon.c:3756:3: error: invalid use of undefined type 'struct pollfd'
p[poll_server].revents = 0;
^
../../../src/microhttpd/daemon.c:3763:3: error: invalid use of undefined type 'struct pollfd'
p[poll_server].fd = MHD_itc_r_fd_ (daemon->itc);
^
../../../src/microhttpd/daemon.c:3764:3: error: invalid use of undefined type 'struct pollfd'
p[poll_server].events = POLLIN;
^
../../../src/microhttpd/daemon.c:3765:3: error: invalid use of undefined type 'struct pollfd'
p[poll_server].revents = 0;
^
../../../src/microhttpd/daemon.c:3781:3: error: invalid use of undefined type 'struct pollfd'
p[poll_server+i].fd = pos->socket_fd;
^
../../../src/microhttpd/daemon.c:3785:7: error: invalid use of undefined type 'struct pollfd'
p[poll_server+i].events |= POLLIN | MHD_POLL_EVENTS_ERR_DISC;
^
In file included from ../../../src/microhttpd/internal.h:72:0,
from ../../../src/microhttpd/daemon.c:32:
../../../src/microhttpd/mhd_sockets.h:362:38: error: 'POLLRDBAND' undeclared (first use in this function); did you mean 'POLLIN'?
# define MHD_POLL_EVENTS_ERR_DISC POLLRDBAND
^
../../../src/microhttpd/daemon.c:3785:42: note: in expansion of macro 'MHD_POLL_EVENTS_ERR_DISC'
p[poll_server+i].events |= POLLIN | MHD_POLL_EVENTS_ERR_DISC;
^~~~~~~~~~~~~~~~~~~~~~~~
../../../src/microhttpd/daemon.c:3788:7: error: invalid use of undefined type 'struct pollfd'
p[poll_server+i].events |= POLLOUT | MHD_POLL_EVENTS_ERR_DISC;
^
../../../src/microhttpd/daemon.c:3788:33: error: 'POLLOUT' undeclared (first use in this function); did you mean 'POLLIN'?
p[poll_server+i].events |= POLLOUT | MHD_POLL_EVENTS_ERR_DISC;
^~~~~~~
POLLIN
../../../src/microhttpd/daemon.c:3791:7: error: invalid use of undefined type 'struct pollfd'
p[poll_server+i].events |= MHD_POLL_EVENTS_ERR_DISC;
^
../../../src/microhttpd/daemon.c:3837:18: error: invalid use of undefined type 'struct pollfd'
(0 != (p[poll_itc_idx].revents & POLLIN)) )
^
../../../src/microhttpd/daemon.c:3854:14: error: invalid use of undefined type 'struct pollfd'
if (p[poll_server+i].fd != pos->socket_fd)
^
../../../src/microhttpd/daemon.c:3857:31: error: invalid use of undefined type 'struct pollfd'
0 != (p[poll_server+i].revents & POLLIN),
^
../../../src/microhttpd/daemon.c:3858:31: error: invalid use of undefined type 'struct pollfd'
0 != (p[poll_server+i].revents & POLLOUT),
^
../../../src/microhttpd/daemon.c:3859:31: error: invalid use of undefined type 'struct pollfd'
0 != (p[poll_server+i].revents & MHD_POLL_REVENTS_ERR_DISC));
^
In file included from ../../../src/microhttpd/internal.h:72:0,
from ../../../src/microhttpd/daemon.c:32:
../../../src/microhttpd/mhd_sockets.h:371:77: error: 'POLLERR' undeclared (first use in this function); did you mean 'POLLOUT'?
(MHD_POLLPRI_OR_ZERO | MHD_POLLRDBAND_OR_ZERO | MHD_POLLNVAL_OR_ZERO | POLLERR | POLLHUP)
^
../../../src/microhttpd/daemon.c:3859:57: note: in expansion of macro 'MHD_POLL_REVENTS_ERR_DISC'
0 != (p[poll_server+i].revents & MHD_POLL_REVENTS_ERR_DISC));
^~~~~~~~~~~~~~~~~~~~~~~~~
../../../src/microhttpd/mhd_sockets.h:371:87: error: 'POLLHUP' undeclared (first use in this function); did you mean 'POLLOUT'?
(MHD_POLLPRI_OR_ZERO | MHD_POLLRDBAND_OR_ZERO | MHD_POLLNVAL_OR_ZERO | POLLERR | POLLHUP)
^
../../../src/microhttpd/daemon.c:3859:57: note: in expansion of macro 'MHD_POLL_REVENTS_ERR_DISC'
0 != (p[poll_server+i].revents & MHD_POLL_REVENTS_ERR_DISC));
^~~~~~~~~~~~~~~~~~~~~~~~~
../../../src/microhttpd/daemon.c:3899:11: error: invalid use of undefined type 'struct pollfd'
(0 != (p[poll_listen].revents & POLLIN)) )
^
../../../src/microhttpd/daemon.c: In function 'MHD_poll_listen_socket':
../../../src/microhttpd/daemon.c:3919:17: error: array type has incomplete element type 'struct pollfd'
struct pollfd p[2];
^
../../../src/microhttpd/daemon.c:3937:30: error: 'POLLIN' undeclared (first use in this function); did you mean 'POINT'?
p[poll_count].events = POLLIN;
^~~~~~
POINT
make[3]: *** [Makefile:1271: libmicrohttpd_la-daemon.lo] Error 1
make[3]: Leaving directory '/home/duall/libmicrohttpd-0.9.62/build/src/microhttpd'
make[2]: *** [Makefile:446: all-recursive] Error 1
make[2]: Leaving directory '/home/duall/libmicrohttpd-0.9.62/build/src'
make[1]: *** [Makefile:580: all-recursive] Error 1
make[1]: Leaving directory '/home/duall/libmicrohttpd-0.9.62/build'
make: *** [Makefile:487: all] Error 2