Skip to content

Commit de4773f

Browse files
a3a3elummakynes
authored andcommitted
selftests: netfilter: fix libmnl pkg-config usage
1. Don't hard-code pkg-config 2. Remove distro-specific default for CFLAGS 3. Use pkg-config for LDLIBS Fixes: a50a88f ("selftests: netfilter: fix a build error on openSUSE") Suggested-by: Jan Engelhardt <[email protected]> Signed-off-by: Jeremy Sowden <[email protected]> Signed-off-by: Pablo Neira Ayuso <[email protected]>
1 parent 8509f62 commit de4773f

File tree

1 file changed

+5
-2
lines changed
  • tools/testing/selftests/netfilter

1 file changed

+5
-2
lines changed

tools/testing/selftests/netfilter/Makefile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,11 @@ TEST_PROGS := nft_trans_stress.sh nft_fib.sh nft_nat.sh bridge_brouter.sh \
88
ipip-conntrack-mtu.sh conntrack_tcp_unreplied.sh \
99
conntrack_vrf.sh nft_synproxy.sh rpath.sh
1010

11-
CFLAGS += $(shell pkg-config --cflags libmnl 2>/dev/null || echo "-I/usr/include/libmnl")
12-
LDLIBS = -lmnl
11+
HOSTPKG_CONFIG := pkg-config
12+
13+
CFLAGS += $(shell $(HOSTPKG_CONFIG) --cflags libmnl 2>/dev/null)
14+
LDLIBS += $(shell $(HOSTPKG_CONFIG) --libs libmnl 2>/dev/null || echo -lmnl)
15+
1316
TEST_GEN_FILES = nf-queue connect_close
1417

1518
include ../lib.mk

0 commit comments

Comments
 (0)