1
0
mirror of https://git.yoctoproject.org/poky synced 2026-07-27 07:27:12 +00:00
Files
Khem Raj 2a314eb41b libpcap: Turn canusb support into PACKAGECONFIG
libpcap notices libusb in its configure if its sysrooted
and ignores it if its not. But this causes problems since
there is no explicit dependency on libusb. Rebuild from shared
state sometimes fails when libusb has not been yet populated
in sysroot and libpcap has. And do_configure of consumers of libpcap e.g. tcpdump
are probing for features on libpcap. All the tests fail since
none of link steps succeed and it sees as if libpcap does
not have required features and configure of tcpdump bails out.

turn canusb into PACKAGECONFIG and let it be disabled
by default.

Backport additional patches needed for disable-canusb to work

(From OE-Core rev: a7cfc0ce9885c51ccefcaba001e6672d7b3e36e5)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-01-25 14:36:16 +00:00

44 lines
1.3 KiB
Diff

Upstream-Status: Backport
From 2259a62edaf667d4bc9d1a28e612e3a7c0011545 Mon Sep 17 00:00:00 2001
From: Gustavo Zacarias <gustavo@zacarias.com.ar>
Date: Sat, 30 Jun 2012 10:48:14 -0700
Subject: [PATCH] canusb: needs -lpthread
canusb uses pthreads, but -lpthread is never added to LIBS hence missing
from pcap-config, causing build failures. Fix this.
---
configure | 2 +-
configure.in | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/configure b/configure
index 1368ac5..24587c8 100755
--- a/configure
+++ b/configure
@@ -11529,7 +11529,7 @@ cat >>confdefs.h <<\_ACEOF
_ACEOF
CANUSB_SRC=pcap-canusb-linux.c
- LIBS="-lusb-1.0 $LIBS"
+ LIBS="-lusb-1.0 -lpthread $LIBS"
{ echo "$as_me:$LINENO: canusb sniffing is supported" >&5
echo "$as_me: canusb sniffing is supported" >&6;}
diff --git a/configure.in b/configure.in
index ba5b64e..47e0b70 100644
--- a/configure.in
+++ b/configure.in
@@ -1408,7 +1408,7 @@ if test "x$enable_canusb" != "xno" ; then
[
AC_DEFINE(PCAP_SUPPORT_CANUSB, 1, [target host supports canusb])
CANUSB_SRC=pcap-canusb-linux.c
- LIBS="-lusb-1.0 $LIBS"
+ LIBS="-lusb-1.0 -lpthread $LIBS"
AC_MSG_NOTICE(canusb sniffing is supported)
],
AC_MSG_NOTICE(canusb sniffing is not supported; install libusb1.0 lib devel to enable it)
--
1.7.9.5