From patchwork Tue Mar 24 21:00:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernd Kuhls X-Patchwork-Id: 1260970 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=t-online.de Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48n3Z23P2Mz9sP7 for ; Wed, 25 Mar 2020 08:00:58 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id E57782156F; Tue, 24 Mar 2020 21:00:54 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VHhjs6uiApdn; Tue, 24 Mar 2020 21:00:54 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id CB3582052C; Tue, 24 Mar 2020 21:00:53 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id C0DE51BF2BF for ; Tue, 24 Mar 2020 21:00:50 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id BB18187C13 for ; Tue, 24 Mar 2020 21:00:50 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JQ9MhDyYQ8aw for ; Tue, 24 Mar 2020 21:00:49 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mailout09.t-online.de (mailout09.t-online.de [194.25.134.84]) by whitealder.osuosl.org (Postfix) with ESMTPS id 7611787BF1 for ; Tue, 24 Mar 2020 21:00:49 +0000 (UTC) Received: from fwd26.aul.t-online.de (fwd26.aul.t-online.de [172.20.26.131]) by mailout09.t-online.de (Postfix) with SMTP id 4D32D423C86B; Tue, 24 Mar 2020 22:00:47 +0100 (CET) Received: from fli4l.lan.fli4l (SU6qoaZXrhJRhGCWm-tKlWUgCijeg6ZXejggb2kQHfWBZARhmJt6KA8XR7uU-TFZWv@[91.58.1.94]) by fwd26.t-online.de with (TLSv1:ECDHE-RSA-AES256-SHA encrypted) esmtp id 1jGqfC-3RV6Iq0; Tue, 24 Mar 2020 22:00:42 +0100 Received: from mahler.lan.fli4l ([192.168.1.1]:37816) by fli4l.lan.fli4l with esmtp (Exim 4.92.3) (envelope-from ) id 1jGqfB-0003yh-JV; Tue, 24 Mar 2020 22:00:41 +0100 From: Bernd Kuhls To: buildroot@buildroot.org Date: Tue, 24 Mar 2020 22:00:40 +0100 Message-Id: <20200324210041.628200-1-bernd.kuhls@t-online.de> X-Mailer: git-send-email 2.25.0 MIME-Version: 1.0 X-ID: SU6qoaZXrhJRhGCWm-tKlWUgCijeg6ZXejggb2kQHfWBZARhmJt6KA8XR7uU-TFZWv X-TOI-MSGID: 3d1e71b7-cdc7-47aa-ab0a-811dff480af8 Subject: [Buildroot] [PATCH 1/2] package/libmicrohttpd: fix pthread detection X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Gregory Dymarek , Will Newton , Adam Duskett Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Fixes: http://autobuild.buildroot.net/results/ceb802eea0fee5812efd717ae4cdbd9673d9507e/ Quoted from config.log: conftest.c:32:26: error: #error "_REENTRANT must be defined" Signed-off-by: Bernd Kuhls --- package/libmicrohttpd/libmicrohttpd.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/package/libmicrohttpd/libmicrohttpd.mk b/package/libmicrohttpd/libmicrohttpd.mk index f47d7ec214..2f5c28cd58 100644 --- a/package/libmicrohttpd/libmicrohttpd.mk +++ b/package/libmicrohttpd/libmicrohttpd.mk @@ -22,4 +22,7 @@ LIBMICROHTTPD_LICENSE = LGPL-2.1+ or eCos LIBMICROHTTPD_CONF_OPTS += --disable-https endif +# fixes pthreads detection +LIBMICROHTTPD_CFLAGS += -D_REENTRANT + $(eval $(autotools-package)) From patchwork Tue Mar 24 21:00:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernd Kuhls X-Patchwork-Id: 1260969 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=t-online.de Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48n3Yw1QGGz9sP7 for ; Wed, 25 Mar 2020 08:00:52 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 6E8AD86B10; Tue, 24 Mar 2020 21:00:50 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id P32xl_GgDjbk; Tue, 24 Mar 2020 21:00:49 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id B4CBC86A73; Tue, 24 Mar 2020 21:00:49 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 378B91BF2BF for ; Tue, 24 Mar 2020 21:00:49 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 33F0186A73 for ; Tue, 24 Mar 2020 21:00:49 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id imq37jItLyTl for ; Tue, 24 Mar 2020 21:00:46 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mailout08.t-online.de (mailout08.t-online.de [194.25.134.20]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 3A11886360 for ; Tue, 24 Mar 2020 21:00:46 +0000 (UTC) Received: from fwd23.aul.t-online.de (fwd23.aul.t-online.de [172.20.26.128]) by mailout08.t-online.de (Postfix) with SMTP id AD41141C4A0F; Tue, 24 Mar 2020 22:00:43 +0100 (CET) Received: from fli4l.lan.fli4l (XdPqwGZLYhFePWdZh96vbgP1IZyFbFSMLrFklpzIV9R9jz9CA8F+ZdMgg4JITk-wmW@[91.58.1.94]) by fwd23.t-online.de with (TLSv1:ECDHE-RSA-AES256-SHA encrypted) esmtp id 1jGqfC-0yRjYe0; Tue, 24 Mar 2020 22:00:42 +0100 Received: from mahler.lan.fli4l ([192.168.1.1]:37816) by fli4l.lan.fli4l with esmtp (Exim 4.92.3) (envelope-from ) id 1jGqfB-0003yh-V3; Tue, 24 Mar 2020 22:00:42 +0100 From: Bernd Kuhls To: buildroot@buildroot.org Date: Tue, 24 Mar 2020 22:00:41 +0100 Message-Id: <20200324210041.628200-2-bernd.kuhls@t-online.de> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200324210041.628200-1-bernd.kuhls@t-online.de> References: <20200324210041.628200-1-bernd.kuhls@t-online.de> MIME-Version: 1.0 X-ID: XdPqwGZLYhFePWdZh96vbgP1IZyFbFSMLrFklpzIV9R9jz9CA8F+ZdMgg4JITk-wmW X-TOI-MSGID: b8b5314c-979c-40c7-beea-f64a5054134a Subject: [Buildroot] [PATCH 2/2] package/libmicrohttpd: remove dependency on threads X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Gregory Dymarek , Will Newton , Adam Duskett Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Upstream added support for non-threaded builds: https://git.gnunet.org/libmicrohttpd.git/commit/configure.ac?id=0eefd20ba370509d93fb7b0220e6d1c5739efac5 Signed-off-by: Bernd Kuhls --- package/janus-gateway/Config.in | 1 - ...0001-daemon.c-fix-non-threaded-build.patch | 35 +++++++++++++++++++ package/libmicrohttpd/Config.in | 4 --- package/libmicrohttpd/libmicrohttpd.mk | 5 +++ 4 files changed, 40 insertions(+), 5 deletions(-) create mode 100644 package/libmicrohttpd/0001-daemon.c-fix-non-threaded-build.patch diff --git a/package/janus-gateway/Config.in b/package/janus-gateway/Config.in index 9b70fa0cad..989ae26055 100644 --- a/package/janus-gateway/Config.in +++ b/package/janus-gateway/Config.in @@ -77,7 +77,6 @@ comment "RabbitMQ transport needs a toolchain w/ dynamic library, threads" config BR2_PACKAGE_JANUS_GATEWAY_REST bool "REST (HTTP/HTTPS)" - depends on BR2_TOOLCHAIN_HAS_THREADS select BR2_PACKAGE_LIBMICROHTTPD comment "REST transport needs a toolchain w/ threads" diff --git a/package/libmicrohttpd/0001-daemon.c-fix-non-threaded-build.patch b/package/libmicrohttpd/0001-daemon.c-fix-non-threaded-build.patch new file mode 100644 index 0000000000..ac9e9c2472 --- /dev/null +++ b/package/libmicrohttpd/0001-daemon.c-fix-non-threaded-build.patch @@ -0,0 +1,35 @@ +From 12e955560730b9caab0e73f693b6382413a8b48e Mon Sep 17 00:00:00 2001 +From: Bernd Kuhls +Date: Tue, 24 Mar 2020 21:53:27 +0100 +Subject: [PATCH] daemon.c: fix non-threaded build + +insanity_level is available only for threaded builds. + +Patch sent upstream: https://bugs.gnunet.org/view.php?id=6135 + +Signed-off-by: Bernd Kuhls +--- + src/microhttpd/daemon.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c +index 4f7c2108..51e9fd5b 100644 +--- a/src/microhttpd/daemon.c ++++ b/src/microhttpd/daemon.c +@@ -5086,12 +5086,12 @@ parse_options_va (struct MHD_Daemon *daemon, + daemon->uri_log_callback_cls = va_arg (ap, + void *); + break; ++#if defined(MHD_USE_POSIX_THREADS) || defined(MHD_USE_W32_THREADS) + case MHD_OPTION_SERVER_INSANITY: + daemon->insanity_level = (enum MHD_DisableSanityCheck) + va_arg (ap, + unsigned int); + break; +-#if defined(MHD_USE_POSIX_THREADS) || defined(MHD_USE_W32_THREADS) + case MHD_OPTION_THREAD_POOL_SIZE: + daemon->worker_pool_size = va_arg (ap, + unsigned int); +-- +2.25.0 + diff --git a/package/libmicrohttpd/Config.in b/package/libmicrohttpd/Config.in index 7f3c9bb8fd..8477ef6668 100644 --- a/package/libmicrohttpd/Config.in +++ b/package/libmicrohttpd/Config.in @@ -1,6 +1,5 @@ config BR2_PACKAGE_LIBMICROHTTPD bool "libmicrohttpd" - depends on BR2_TOOLCHAIN_HAS_THREADS help GNU libmicrohttpd is a small C library that makes it easy to run an HTTP server as part of another application. @@ -21,6 +20,3 @@ comment "libmicrohttpd https support needs a toolchain w/ wchar, dynamic library depends on !BR2_USE_WCHAR || BR2_STATIC_LIBS endif - -comment "libmicrohttpd needs a toolchain w/ threads" - depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/libmicrohttpd/libmicrohttpd.mk b/package/libmicrohttpd/libmicrohttpd.mk index 2f5c28cd58..29afeefcea 100644 --- a/package/libmicrohttpd/libmicrohttpd.mk +++ b/package/libmicrohttpd/libmicrohttpd.mk @@ -22,7 +22,12 @@ LIBMICROHTTPD_LICENSE = LGPL-2.1+ or eCos LIBMICROHTTPD_CONF_OPTS += --disable-https endif +ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y) +LIBMICROHTTPD_CONF_OPTS += --with-threads=auto # fixes pthreads detection LIBMICROHTTPD_CFLAGS += -D_REENTRANT +else +LIBMICROHTTPD_CONF_OPTS += --with-threads=none +endif $(eval $(autotools-package))