Skip to content

Commit a50a88f

Browse files
geliangtangshuahkh
authored andcommitted
selftests: netfilter: fix a build error on openSUSE
This patch fixed the following build error on openSUSE Leap 15.3: ======================================================================= gcc nf-queue.c -lmnl -o tools/testing/selftests/netfilter/nf-queue nf-queue.c:13:10: fatal error: libmnl/libmnl.h: No such file or directory #include <libmnl/libmnl.h> ^~~~~~~~~~~~~~~~~ compilation terminated. ======================================================================= It is because libmnl.h is put in the directory of "/usr/include/libmnl/libmnl/" on openSUSE, not "/usr/include/libmnl/": > rpm -ql libmnl-devel /usr/include/libmnl /usr/include/libmnl/libmnl /usr/include/libmnl/libmnl/libmnl.h /usr/lib64/libmnl.so /usr/lib64/pkgconfig/libmnl.pc Suggested-by: Kai Liu <kai.liu@suse.com> Signed-off-by: Geliang Tang <geliang.tang@suse.com> Reviewed-by: Shuah Khan <skhan@linuxfoundation.org> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
1 parent 946ad04 commit a50a88f

File tree

1 file changed

+1
-0
lines changed
  • tools/testing/selftests/netfilter

1 file changed

+1
-0
lines changed

tools/testing/selftests/netfilter/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ 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
1010

11+
CFLAGS += $(shell pkg-config --cflags libmnl 2>/dev/null || echo "-I/usr/include/libmnl")
1112
LDLIBS = -lmnl
1213
TEST_GEN_FILES = nf-queue
1314

0 commit comments

Comments
 (0)