kumquat-buildroot/package/ngrep/0004-configure.in-use-pkg-config-to-find-libnet.patch
Fabrice Fontaine 14c0c37eaf package/ngrep: fix build with libnet
Use pkg-config to find libnet and avoid the following build failure
raised since commit 100ba8351c if
libnet-config is found on the host:

/home/autobuild/autobuild/instance-4/output-1/host/bin/mips64el-buildroot-linux-gnu-gcc -s -o ngrep ngrep.o  tcpkill.o   -lpcap -lnet   -lpcre -L/usr/lib -lnet
mips64el-buildroot-linux-gnu-gcc: ERROR: unsafe header/library path used in cross-compilation: '-L/usr/lib'

While at it, format Upstream tag of other patches

Fixes:
 - http://autobuild.buildroot.org/results/05c916162b9c1027cf53f1699a1f5653151098ed

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2024-02-05 18:48:08 +01:00

39 lines
1.2 KiB
Diff

From 4788988827bf4c0d996d3e1e3b6ac52a23b97941 Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date: Tue, 9 Jan 2024 21:15:47 +0100
Subject: [PATCH] configure.in: use pkg-config to find libnet
libnet-config is deprecated:
https://github.com/libnet/libnet/commit/1ec4a6e7d1d23811f0a14ecb51e46489a0175727
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Upstream: unsent (upstream seems dead, no commit since 5 years
---
configure.in | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/configure.in b/configure.in
index 7c3dd43..882ff86 100644
--- a/configure.in
+++ b/configure.in
@@ -176,12 +176,14 @@ AC_ARG_ENABLE(tcpkill,
[ use_tcpkill="$enableval" ],
[ use_tcpkill="no" ])
+PKG_PROG_PKG_CONFIG
if test $use_tcpkill = yes; then
AC_CHECK_LIB(net, libnet_init,,echo !!! error: tcpkill feature enabled but no libnet found; exit)
USE_TCPKILL="1"
EXTRA_OBJS="$EXTRA_OBJS tcpkill.o"
- EXTRA_DEFINES="$EXTRA_DEFINES $(libnet-config --defines)"
- EXTRA_LIBS="$EXTRA_LIBS $(libnet-config --libs)"
+ PKG_CHECK_MODULES(LIBNET, libnet)
+ EXTRA_DEFINES="$EXTRA_DEFINES $LIBNET_CFLAGS"
+ EXTRA_LIBS="$EXTRA_LIBS $LIBNET_LIBS"
else
USE_TCPKILL="0"
fi
--
2.43.0