diff mbox series

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

Message ID 20220108075018.22567-1-bernd.kuhls@t-online.de
State Accepted
Headers show
Series [1/1] package/libmicrohttpd: fix pthread detection | expand

Commit Message

Bernd Kuhls Jan. 8, 2022, 7:50 a.m. UTC
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@t-online.de>
---
 package/libmicrohttpd/libmicrohttpd.mk | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Arnout Vandecappelle Jan. 8, 2022, 3:12 p.m. UTC | #1
On 08/01/2022 08:50, Bernd Kuhls wrote:
> 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@t-online.de>

  Applied to master, thanks.

  Regards,
  Arnout

> ---
>   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)
>
diff mbox series

Patch

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)