14c0c37eaf
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>
40 lines
1.2 KiB
Diff
40 lines
1.2 KiB
Diff
From e8522284ef326bd9f222e04c4a970ffafa56fba6 Mon Sep 17 00:00:00 2001
|
|
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
|
Date: Sat, 3 Nov 2018 23:23:36 +0100
|
|
Subject: [PATCH] fix --disable-tcpkill
|
|
|
|
If the user uses --disable-tcpkill, build can fail if libnet is not
|
|
found on the system.
|
|
|
|
To fix this, move AC_CHECK_LIB to found libnet outside AC_ARG_ENABLE
|
|
|
|
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
|
Upstream: https://github.com/jpr5/ngrep/pull/15
|
|
---
|
|
configure.in | 6 ++----
|
|
1 file changed, 2 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/configure.in b/configure.in
|
|
index dbef39b..7c3dd43 100644
|
|
--- a/configure.in
|
|
+++ b/configure.in
|
|
@@ -173,13 +173,11 @@ dnl
|
|
|
|
AC_ARG_ENABLE(tcpkill,
|
|
[ --enable-tcpkill enable connection killing support (default off)],
|
|
-[
|
|
- AC_CHECK_LIB(net, libnet_init,,echo !!! error: tcpkill feature enabled but no libnet found; exit)
|
|
- use_tcpkill="$enableval"
|
|
-],
|
|
+[ use_tcpkill="$enableval" ],
|
|
[ use_tcpkill="no" ])
|
|
|
|
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)"
|
|
--
|
|
2.17.1
|
|
|