* [PATCH] selftests: netfilter: fix a build error on openSUSE
@ 2022-03-02 4:26 Geliang Tang
0 siblings, 0 replies; only message in thread
From: Geliang Tang @ 2022-03-02 4:26 UTC (permalink / raw)
To: Shuah Khan; +Cc: Geliang Tang, linux-kselftest
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
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
---
tools/testing/selftests/netfilter/Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/testing/selftests/netfilter/Makefile b/tools/testing/selftests/netfilter/Makefile
index e4f845dd942b..12a4bd689418 100644
--- a/tools/testing/selftests/netfilter/Makefile
+++ b/tools/testing/selftests/netfilter/Makefile
@@ -8,6 +8,7 @@ TEST_PROGS := nft_trans_stress.sh nft_fib.sh nft_nat.sh bridge_brouter.sh \
ipip-conntrack-mtu.sh conntrack_tcp_unreplied.sh \
conntrack_vrf.sh nft_synproxy.sh
+CFLAGS += -I/usr/include/libmnl
LDLIBS = -lmnl
TEST_GEN_FILES = nf-queue
--
2.34.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2022-03-02 4:27 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-02 4:26 [PATCH] selftests: netfilter: fix a build error on openSUSE Geliang Tang
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.