Skip to content

Conversation

hzeller
Copy link
Contributor

@hzeller hzeller commented Sep 26, 2021

The return codes of current libmicrohttpd changed from int
to MHD_Result at some point. Make it possible to be able to
compile against the old and the new version of libmicrohttpd.

Signed-off-by: Henner Zeller [email protected]

@hzeller
Copy link
Contributor Author

hzeller commented Sep 26, 2021

The CI build failure seems unrelated to my changes. The build fails due to #include <catch2/catch.hpp> not found, which looks more like the CI is missing some dependencies.

@hzeller
Copy link
Contributor Author

hzeller commented Sep 26, 2021

It looks like #299 did a similar change on the develop branch, but only partially: it uses the MHD_Result always (which will then only compile with newer versions, no older libmicrohttpd versions).

This change here makes things version-agnostic using #if MHD_VERSION >= 0x00097101.

@hzeller hzeller changed the title Make possible to compile against old and new libmicrohttpd. Master branch: Fix build, make possible to compile against old and new libmicrohttpd. Sep 26, 2021
@sisco0
Copy link

sisco0 commented Sep 26, 2021

Also needed at my version 0x00097002, after changing the conditional typedef with that version everything works under my system.


/**
 * Current version of the library.
 * 0x01093001 = 1.9.30-1.
 */
#define MHD_VERSION 0x00097002

The return codes of current libmicrohttpd changed from int
to MHD_Result at some point. Make it possible to be able to
compile against the old and the new version of libmicrohttpd.

Signed-off-by: Henner Zeller <[email protected]>
@hzeller hzeller force-pushed the make-work-with-newer-libmicrohttpd branch from b82e5eb to 7556d80 Compare September 26, 2021 03:01
@hzeller
Copy link
Contributor Author

hzeller commented Sep 26, 2021

Alright, changed to that version @sisco0

I did look around in the version history, and unfortunately, microhttpd had some discontinuation between versions 0x00097001 and 0x00097002. When the enum was introduced the version was temporarily warped back from 0x00097002 to 0x00097001, possibly due to merging issues.
Anyway, using 0x00097002 is probably the best choice with minimal issues.

@cinemast
Copy link
Owner

Thanks a lot! Sorry about the broken builds. I really need to fix that.

@cinemast cinemast merged commit 180b8cf into cinemast:master Sep 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants