summaryrefslogtreecommitdiffstats
path: root/libnftnl.pc.in
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@bootlin.com>2019-07-05 11:34:19 +0300
committerPablo Neira Ayuso <pablo@netfilter.org>2019-07-05 20:27:45 +0200
commit78709f7b55aa8934f42aa40548dcdf65e6bfeb2c (patch)
tree3f0023d89f455b0e49c6491007ccd3ce9afa7709 /libnftnl.pc.in
parent60d9378df4e9c7324392e76b0408b6dda6e8bc1c (diff)
Add Requires.private field to libnftnl.pc
Static linking userspace programs such as nftables against libnftnl currently doesn't work out of the box, because libnftnl is linked against libmnl, but this isn't expressed in libnftnl pkg-config file: CCLD nft [...]/bfin-buildroot-uclinux-uclibc/sysroot/usr/lib/libnftnl.a(table.o): In function `_nft_table_nlmsg_parse': table.c:(.text+0x480): undefined reference to `_mnl_attr_parse' table.c:(.text+0x492): undefined reference to `_mnl_attr_get_str' table.c:(.text+0x4a8): undefined reference to `_mnl_attr_get_u32' table.c:(.text+0x4ca): undefined reference to `_mnl_attr_get_u32' [...] The Libs.private field is specifically designed for such usage: >From pkg-config documentation: Requires.private: A list of packages required by this package. The difference from Requires is that the packages listed under Requires.private are not taken into account when a flag list is computed for dynamically linked executable (i.e., when --static was not specified). In the situation where each .pc file corresponds to a library, Requires.private shall be used exclusively to specify the dependencies between the libraries. Therefore, this patch adds a reference to libmnl in the Requires.private field of libnftnl pkg-config file. [baruch: use Requires.private; update commit log] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'libnftnl.pc.in')
-rw-r--r--libnftnl.pc.in1
1 files changed, 1 insertions, 0 deletions
diff --git a/libnftnl.pc.in b/libnftnl.pc.in
index fd5cc6a..ef94d74 100644
--- a/libnftnl.pc.in
+++ b/libnftnl.pc.in
@@ -10,6 +10,7 @@ Description: Netfilter nf_tables infrastructure library
URL: http://netfilter.org/projects/libnftnl/
Version: @VERSION@
Requires:
+Requires.private: libmnl
Conflicts:
Libs: -L${libdir} -lnftnl
Cflags: -I${includedir}