diff mbox

[iproute2] Use pkg-config to obtain xtables.h path

Message ID 1360185564-29094-1-git-send-email-bpoirier@suse.de
State Accepted, archived
Delegated to: stephen hemminger
Headers show

Commit Message

Benjamin Poirier Feb. 6, 2013, 9:19 p.m. UTC
On openSUSE 12.2 (at least) xtables.h is not installed in the system-wide
include dir but in /usr/include/iptables-1.4.16.3/. This results in the
following build failure:
em_ipset.c:26:21: fatal error: xtables.h: No such file or directory

Other includers of xtables.h already call out to pkg-config
---
 tc/Makefile |    2 ++
 1 file changed, 2 insertions(+)

Comments

Stephen Hemminger Feb. 11, 2013, 5:25 p.m. UTC | #1
On Wed,  6 Feb 2013 16:19:24 -0500
Benjamin Poirier <bpoirier@suse.de> wrote:

> On openSUSE 12.2 (at least) xtables.h is not installed in the system-wide
> include dir but in /usr/include/iptables-1.4.16.3/. This results in the
> following build failure:
> em_ipset.c:26:21: fatal error: xtables.h: No such file or directory
> 
> Other includers of xtables.h already call out to pkg-config

Accepted
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/tc/Makefile b/tc/Makefile
index 696f891..f26e764 100644
--- a/tc/Makefile
+++ b/tc/Makefile
@@ -140,6 +140,8 @@  m_xt.so: m_xt.c
 m_xt_old.so: m_xt_old.c
 	$(CC) $(CFLAGS) $(LDFLAGS) -shared -fpic -o m_xt_old.so m_xt_old.c $$($(PKG_CONFIG) xtables --cflags --libs)
 
+em_ipset.o: CFLAGS += $$($(PKG_CONFIG) xtables --cflags)
+
 %.yacc.c: %.y
 	$(YACC) $(YACCFLAGS) -o $@ $<