[Buildroot] [PATCH 1/1] package/libmicrohttpd: fix pthread detection

Bernd Kuhls bernd.kuhls at t-online.de
Sat Jan 8 07:50:18 UTC 2022


Fix autobuild failures after bumping the package to 0.9.75 in commit
8ec001b467e22904c0a7ec5780d83afd44ad78f3:

conftest.c:64:26: error: #error "_REENTRANT must be defined"

Fixes:
http://autobuild.buildroot.net/results/f76/f7668104dd64a93f0b343ce3ebbe50b12584184d/

Signed-off-by: Bernd Kuhls <bernd.kuhls at t-online.de>
---
 package/libmicrohttpd/libmicrohttpd.mk | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/package/libmicrohttpd/libmicrohttpd.mk b/package/libmicrohttpd/libmicrohttpd.mk
index f75178bc0a..344e1443fd 100644
--- a/package/libmicrohttpd/libmicrohttpd.mk
+++ b/package/libmicrohttpd/libmicrohttpd.mk
@@ -12,6 +12,10 @@ LIBMICROHTTPD_INSTALL_STAGING = YES
 LIBMICROHTTPD_CONF_OPTS = --disable-curl --disable-examples
 LIBMICROHTTPD_CFLAGS = $(TARGET_CFLAGS) -std=c99
 
+ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
+LIBMICROHTTPD_CFLAGS += -D_REENTRANT
+endif
+
 LIBMICROHTTPD_CONF_ENV += CFLAGS="$(LIBMICROHTTPD_CFLAGS)"
 
 ifeq ($(BR2_PACKAGE_LIBMICROHTTPD_SSL),y)
-- 
2.30.2




More information about the buildroot mailing list