| From 2d38d16d86db941fcb4d4fb8ad761e7e163c01e5 Mon Sep 17 00:00:00 2001 |
| From: Baruch Siach <baruch@tkos.co.il> |
| Date: Sun, 16 Apr 2017 07:41:38 +0300 |
| Subject: [PATCH] flowtop: take PKG_CONFIG into account for |
| libnetfilter_conntrack |
| |
| Use $PKG_CONFIG to determine the linker flags for libnetfilter_conntrack. This |
| fixes static link failure like the following: |
| |
| LD flowtop |
| .../usr/x86_64-buildroot-linux-musl/sysroot/usr/lib/../lib64/libnetfilter_conntrack.a(main.o): In function `nfct_open_nfnl': |
| main.c:(.text+0x52): undefined reference to `nfnl_subsys_open' |
| main.c:(.text+0x69): undefined reference to `nfnl_subsys_close' |
| main.c:(.text+0x87): undefined reference to `nfnl_subsys_open' |
| main.c:(.text+0xa3): undefined reference to `nfnl_subsys_close' |
| .../usr/x86_64-buildroot-linux-musl/sysroot/usr/lib/../lib64/libnetfilter_conntrack.a(main.o): In function `nfct_open': |
| main.c:(.text+0xc9): undefined reference to `nfnl_open' |
| main.c:(.text+0xf0): undefined reference to `nfnl_close' |
| ... |
| |
| Signed-off-by: Baruch Siach <baruch@tkos.co.il> |
| --- |
| |
| Patch status: sent upstream |
| http://www.mail-archive.com/netsniff-ng%40googlegroups.com/msg01971.html |
| |
| flowtop/Makefile | 2 +- |
| 1 file changed, 1 insertion(+), 1 deletion(-) |
| |
| diff --git a/flowtop/Makefile b/flowtop/Makefile |
| index effe7eb33fc3..e001ce8aaf13 100644 |
| --- a/flowtop/Makefile |
| +++ b/flowtop/Makefile |
| @@ -1,5 +1,5 @@ |
| flowtop-libs = -lurcu \ |
| - -lnetfilter_conntrack \ |
| + $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKG_CONFIG) --libs libnetfilter_conntrack 2> /dev/null ) \ |
| $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKG_CONFIG) --libs ncurses 2> /dev/null \ |
| || echo '-lncurses') \ |
| $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) $(PKG_CONFIG) --libs tinfo 2> /dev/null ) \ |
| -- |
| 2.11.0 |
| |