aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2018-10-26 09:16:19 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2018-10-26 09:16:19 +0200
commit68fb4de4c809825670818a9360c98f62c947c2ed (patch)
treead3b40abb4addffb3453d27dc6e547bb66ecd714
parentdfe85ca516c207eadc4ae77066c6706f17068f20 (diff)
afb-hsrv: Adapt to next version of libmicrohttpd
Change-Id: I5bef17178e972e73b653ddbff5a8b09cfc2287eb Signed-off-by: José Bollo <jose.bollo@iot.bzh>
-rw-r--r--src/afb-hsrv.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/afb-hsrv.c b/src/afb-hsrv.c
index 1a4d1ad0..685c55b8 100644
--- a/src/afb-hsrv.c
+++ b/src/afb-hsrv.c
@@ -29,6 +29,9 @@
#include <json-c/json.h>
#include <microhttpd.h>
+#if MHD_VERSION < 0x00095206
+# define MHD_ALLOW_SUSPEND_RESUME MHD_USE_SUSPEND_RESUME
+#endif
#include "afb-method.h"
#include "afb-context.h"
@@ -417,7 +420,7 @@ int afb_hsrv_start(struct afb_hsrv *hsrv, uint16_t port, unsigned int connection
const union MHD_DaemonInfo *info;
httpd = MHD_start_daemon(
- MHD_USE_EPOLL | MHD_ALLOW_UPGRADE | MHD_USE_TCP_FASTOPEN | MHD_USE_DEBUG | MHD_USE_SUSPEND_RESUME,
+ MHD_USE_EPOLL | MHD_ALLOW_UPGRADE | MHD_USE_TCP_FASTOPEN | MHD_USE_DEBUG | MHD_ALLOW_SUSPEND_RESUME,
port, /* port */
new_client_handler, NULL, /* Tcp Accept call back + extra attribute */
access_handler, hsrv, /* Http Request Call back + extra attribute */