xref: /OK3568_Linux_fs/buildroot/package/ngrep/0003-fix-disable-tcpkill.patch (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1From e8522284ef326bd9f222e04c4a970ffafa56fba6 Mon Sep 17 00:00:00 2001
2From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
3Date: Sat, 3 Nov 2018 23:23:36 +0100
4Subject: [PATCH] fix --disable-tcpkill
5
6If the user uses --disable-tcpkill, build can fail if libnet is not
7found on the system.
8
9To fix this, move AC_CHECK_LIB to found libnet outside AC_ARG_ENABLE
10
11Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
12[Upstream status: https://github.com/jpr5/ngrep/pull/15]
13---
14 configure.in | 6 ++----
15 1 file changed, 2 insertions(+), 4 deletions(-)
16
17diff --git a/configure.in b/configure.in
18index dbef39b..7c3dd43 100644
19--- a/configure.in
20+++ b/configure.in
21@@ -173,13 +173,11 @@ dnl
22
23 AC_ARG_ENABLE(tcpkill,
24 [  --enable-tcpkill        enable connection killing support (default off)],
25-[
26-  AC_CHECK_LIB(net, libnet_init,,echo !!! error: tcpkill feature enabled but no libnet found; exit)
27-  use_tcpkill="$enableval"
28-],
29+[ use_tcpkill="$enableval" ],
30 [ use_tcpkill="no" ])
31
32 if test $use_tcpkill = yes; then
33+  AC_CHECK_LIB(net, libnet_init,,echo !!! error: tcpkill feature enabled but no libnet found; exit)
34   USE_TCPKILL="1"
35   EXTRA_OBJS="$EXTRA_OBJS tcpkill.o"
36   EXTRA_DEFINES="$EXTRA_DEFINES $(libnet-config --defines)"
37--
382.17.1
39
40