All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@buildroot.org
Subject: [Buildroot] [git commit] package/daq3: fix build without threads
Date: Sat, 24 Jul 2021 22:23:19 +0200	[thread overview]
Message-ID: <20210724194941.A37D18899D@busybox.osuosl.org> (raw)

commit: https://git.buildroot.net/buildroot/commit/?id=7c8641e5a97b89c14aebd730772e9cc037de6ccc
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

pcap module and example unconditionally uses pthread.h

Fixes:
 - http://autobuild.buildroot.org/results/b618bcca1a83704f7f15e76cd1e7f1117cbbd464

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 package/daq3/0001-add-disable-example.patch | 49 +++++++++++++++++++++++++++++
 package/daq3/daq3.mk                        |  3 +-
 2 files changed, 51 insertions(+), 1 deletion(-)

diff --git a/package/daq3/0001-add-disable-example.patch b/package/daq3/0001-add-disable-example.patch
new file mode 100644
index 0000000000..c126e32859
--- /dev/null
+++ b/package/daq3/0001-add-disable-example.patch
@@ -0,0 +1,49 @@
+From 1d7031dde8da39cd2151f87d68dddea91f304603 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Sat, 19 Jun 2021 11:31:35 +0200
+Subject: [PATCH] add --disable-example
+
+Add --disable-example to be able to build daq on toolchains without
+threads support
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+[Upstream status: https://github.com/snort3/libdaq/pull/13]
+---
+ Makefile.am  | 5 ++++-
+ configure.ac | 5 +++++
+ 2 files changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index dcba62b..0a79319 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -7,6 +7,9 @@ pkgconfig_DATA = libdaq.pc
+ if BUILD_MODULES
+     MODULES_DIR = modules
+ endif
+-SUBDIRS = api $(MODULES_DIR) example test
++SUBDIRS = api $(MODULES_DIR) test
++if BUILD_EXAMPLE
++    SUBDIRS += example
++endif
+ 
+ ACLOCAL_AMFLAGS = -I m4
+diff --git a/configure.ac b/configure.ac
+index 23b38a2..36a09ee 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -274,6 +274,11 @@ AM_CONDITIONAL([BUILD_MODULES], [test "$enable_afpacket_module" = yes -o \
+ 
+ LIBS=${save_LIBS}
+ 
++AC_ARG_ENABLE(example,
++              AS_HELP_STRING([--disable-example],[do not build the example]),
++              [enable_example="$enableval"], [enable_example=yes])
++AM_CONDITIONAL([BUILD_EXAMPLE], [test "$enable_example" = yes])
++
+ AC_CHECK_LIB([dl], [dlopen], [LIBDL="-ldl"])
+ 
+ AM_CONDITIONAL([BUILD_SHARED_MODULES], [ test "$enable_shared" = yes ])
+-- 
+2.30.2
+
diff --git a/package/daq3/daq3.mk b/package/daq3/daq3.mk
index a0493031d8..50e0eaccba 100644
--- a/package/daq3/daq3.mk
+++ b/package/daq3/daq3.mk
@@ -12,6 +12,7 @@ DAQ3_INSTALL_STAGING = YES
 DAQ3_DEPENDENCIES = host-pkgconf
 # From git
 DAQ3_AUTORECONF = YES
+DAQ3_CONF_OPTS = --disable-example
 
 ifeq ($(BR2_PACKAGE_LIBNETFILTER_QUEUE),y)
 DAQ3_DEPENDENCIES += libnetfilter_queue
@@ -20,7 +21,7 @@ else
 DAQ3_CONF_OPTS += --disable-nfq-module
 endif
 
-ifeq ($(BR2_PACKAGE_LIBPCAP),y)
+ifeq ($(BR2_PACKAGE_LIBPCAP)$(BR2_TOOLCHAIN_HAS_THREADS),yy)
 DAQ3_DEPENDENCIES += libpcap
 DAQ3_CONF_OPTS += --enable-pcap-module
 else
_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

                 reply	other threads:[~2021-07-24 20:25 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210724194941.A37D18899D@busybox.osuosl.org \
    --to=thomas.petazzoni@bootlin.com \
    --cc=buildroot@buildroot.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.