Hi all,

I'm using MHD in my server and it works great. Recently I've been told,
though, that some people couldn't get it to work. Somebody pointed out that
it only seems to happen on recent versions, so I tried 0.9.53 (the latest
on my Fedora) and that seems indeed to be the case.

Specifically, by fiddling a bit with the code it looks like the cause of
the failure is the MHD_USE_POLL. Check this sample test code as an example:

https://gist.github.com/lminiero/5bd6795f2534b9c523c90603ec23816a

The code as it is results in a failure for me (daemon=NULL). If I remove
the MHD_USE_POLL, it works instead. The same code was definitely working on
the previous version of MHD my Fedora shipped (0.9.46), but not sure if
0.9.53 itself is the cause or any version in between.

At first I thought it could be a problem with flag names, as I read in the
Changelog that some changed, but even in that case, the Changelog also says
old names are still supported for backwards compatibilty. Besides,
apparently MHD_USE_POLL is not one of the affected ones.

I also considered the possibility that it may be an issue with how the
Fedora 25 rpm was built, as MHD_USE_POLL is supposed to fail if poll() is
not available (#ifndef HAVE_POLL) and so it might simply be a matter of a
broken check there, but I'm not convinced that's it, as the same issue was
reported on different distros (e.g., Arch Linux) and systems (Mac OS). So
if it really is a broken check, it seems to be broken in more than one
place.

Do you have any insight on what may be the problem here?

Thanks!
Lorenzo

Reply via email to