From b912ac656c4c6812dd2c9ea9a7c163a9b9242029 Mon Sep 17 00:00:00 2001 From: electron128 Date: Fri, 20 Mar 2015 07:18:37 +0000 Subject: [PATCH] fixed compile with libmicrohttpd >= 0.9.20 (old version numbers are in hex) git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8056 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- libresapi/src/api/ApiServerMHD.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/libresapi/src/api/ApiServerMHD.cpp b/libresapi/src/api/ApiServerMHD.cpp index 0bc5f39be..8d0144a88 100644 --- a/libresapi/src/api/ApiServerMHD.cpp +++ b/libresapi/src/api/ApiServerMHD.cpp @@ -10,8 +10,10 @@ #include "api/JsonStream.h" - -#if MHD_VERSION < 0x00092000 +// old version number use hex, new ones use decimal numbers +// this is a hex number: 0x14 = 20 +// -> 0.9.20 +#if MHD_VERSION < 0x00091400 #define MHD_CONTENT_READER_END_OF_STREAM ((size_t) -1LL) /** * Create a response object. The response object can be extended with @@ -201,7 +203,7 @@ public: MHD_destroy_response(resp); return MHD_YES; } -#if MHD_VERSION >= 0x00092000 +#if MHD_VERSION >= 0x00091400 static ssize_t contentReadercallback(void *cls, uint64_t pos, char *buf, size_t max) #else // old version static int contentReadercallback(void *cls, uint64_t pos, char *buf, int max)