* iproute2: proper detection of libxtables position and flags
@ 2011-12-31 22:17 Jan Engelhardt
2011-12-31 22:18 ` iproute2: fix calling up the xt action Jan Engelhardt
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Jan Engelhardt @ 2011-12-31 22:17 UTC (permalink / raw)
To: shemminger; +Cc: Linux Networking Developer Mailing List
From: Jan Engelhardt <jengelh@medozas.de>
Date: 2011-09-24 23:37:34.405739159 +0200
Upstream: not sent yet
Any tests involving iptables _MUST_ utilize pkg-config to find the
proper locations of the installation.
---
configure | 2 +-
tc/Makefile | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
Index: iproute2-2.6.39/configure
===================================================================
--- iproute2-2.6.39.orig/configure
+++ iproute2-2.6.39/configure
@@ -49,7 +49,7 @@ int main(int argc, char **argv)
EOF
-if gcc -I$INCLUDE $IPTC -o /tmp/ipttest /tmp/ipttest.c $IPTL -ldl -lxtables >/dev/null 2>&1
+if gcc -I$INCLUDE $IPTC -o /tmp/ipttest /tmp/ipttest.c $IPTL $(pkg-config xtables --cflags --libs) -ldl >/dev/null 2>&1
then
echo "TC_CONFIG_XT:=y" >>Config
echo "using xtables"
Index: iproute2-2.6.39/tc/Makefile
===================================================================
--- iproute2-2.6.39.orig/tc/Makefile
+++ iproute2-2.6.39/tc/Makefile
@@ -124,10 +124,10 @@ q_atm.so: q_atm.c
$(CC) $(CFLAGS) $(LDFLAGS) -shared -fpic -o q_atm.so q_atm.c -latm
m_xt.so: m_xt.c
- $(CC) $(CFLAGS) $(LDFLAGS) -shared -fpic -o m_xt.so m_xt.c -lxtables
+ $(CC) $(CFLAGS) $(LDFLAGS) -shared -fpic -o m_xt.so m_xt.c $$(pkg-config xtables --cflags --libs)
m_xt_old.so: m_xt_old.c
- $(CC) $(CFLAGS) $(LDFLAGS) -shared -fpic -o m_xt_old.so m_xt_old.c -lxtables
+ $(CC) $(CFLAGS) $(LDFLAGS) -shared -fpic -o m_xt_old.so m_xt_old.c $$(pkg-config xtables --cflags --libs)
%.yacc.c: %.y
$(YACC) $(YACCFLAGS) -o $@ $<
^ permalink raw reply [flat|nested] 6+ messages in thread
* iproute2: fix calling up the xt action
2011-12-31 22:17 iproute2: proper detection of libxtables position and flags Jan Engelhardt
@ 2011-12-31 22:18 ` Jan Engelhardt
2011-12-31 22:22 ` iproute2: avoid use of implicit declarations Jan Engelhardt
2012-01-03 21:47 ` iproute2: proper detection of libxtables position and flags Stephen Hemminger
2 siblings, 0 replies; 6+ messages in thread
From: Jan Engelhardt @ 2011-12-31 22:18 UTC (permalink / raw)
To: shemminger; +Cc: Linux Networking Developer Mailing List
From: Jan Engelhardt <jengelh@medozas.de>
Date: 2011-06-01 00:52:07+0200
Upsteam: has not been sent yet
Requesting the xt action never succeeded because it registered
using the wrong name.
---
tc/m_xt.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Index: iproute2-2.6.37/tc/m_xt.c
===================================================================
--- iproute2-2.6.37.orig/tc/m_xt.c
+++ iproute2-2.6.37/tc/m_xt.c
@@ -343,8 +343,8 @@ print_ipt(struct action_util *au,FILE *
return 0;
}
-struct action_util ipt_action_util = {
- .id = "ipt",
+struct action_util xt_action_util = {
+ .id = "xt",
.parse_aopt = parse_ipt,
.print_aopt = print_ipt,
};
^ permalink raw reply [flat|nested] 6+ messages in thread
* iproute2: avoid use of implicit declarations
2011-12-31 22:17 iproute2: proper detection of libxtables position and flags Jan Engelhardt
2011-12-31 22:18 ` iproute2: fix calling up the xt action Jan Engelhardt
@ 2011-12-31 22:22 ` Jan Engelhardt
2012-01-03 21:57 ` Stephen Hemminger
2012-01-03 21:47 ` iproute2: proper detection of libxtables position and flags Stephen Hemminger
2 siblings, 1 reply; 6+ messages in thread
From: Jan Engelhardt @ 2011-12-31 22:22 UTC (permalink / raw)
To: shemminger; +Cc: Linux Networking Developer Mailing List
From: Jan Engelhardt <jengelh@medozas.de>
Date: 2011-12-31 23:16:27.428349795 +0100
gcc -DLIBDIR=\"/usr/lib64\" -D_GNU_SOURCE -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -Wstrict-prototypes -fPIC -DXT_LIB_DIR=\"/usr/lib64/xtables\" -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib64\" -fPIC -c -o ipx_pton.o ipx_pton.c
In file included from ../include/utils.h:8:0,
from ipx_ntop.c:5:
../include/libnetlink.h: In function 'rta_getattr_u64':
../include/libnetlink.h:84:2: warning: implicit declaration of function 'memcpy'
../include/libnetlink.h:84:2: warning: incompatible implicit declaration of built-in function 'memcpy'
diff --git a/include/libnetlink.h b/include/libnetlink.h
index b237579..b0656ce 100644
--- a/include/libnetlink.h
+++ b/include/libnetlink.h
@@ -1,6 +1,7 @@
#ifndef __LIBNETLINK_H__
#define __LIBNETLINK_H__ 1
+#include <string.h>
#include <asm/types.h>
#include <linux/netlink.h>
#include <linux/rtnetlink.h>
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: iproute2: proper detection of libxtables position and flags
2011-12-31 22:17 iproute2: proper detection of libxtables position and flags Jan Engelhardt
2011-12-31 22:18 ` iproute2: fix calling up the xt action Jan Engelhardt
2011-12-31 22:22 ` iproute2: avoid use of implicit declarations Jan Engelhardt
@ 2012-01-03 21:47 ` Stephen Hemminger
2012-01-03 22:18 ` Jan Engelhardt
2 siblings, 1 reply; 6+ messages in thread
From: Stephen Hemminger @ 2012-01-03 21:47 UTC (permalink / raw)
To: Jan Engelhardt; +Cc: Linux Networking Developer Mailing List
On Sat, 31 Dec 2011 23:17:56 +0100 (CET)
Jan Engelhardt <jengelh@medozas.de> wrote:
> From: Jan Engelhardt <jengelh@medozas.de>
> Date: 2011-09-24 23:37:34.405739159 +0200
> Upstream: not sent yet
>
> Any tests involving iptables _MUST_ utilize pkg-config to find the
> proper locations of the installation.
>
Will this work for all distros? Is this backwards compatiable?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: iproute2: avoid use of implicit declarations
2011-12-31 22:22 ` iproute2: avoid use of implicit declarations Jan Engelhardt
@ 2012-01-03 21:57 ` Stephen Hemminger
0 siblings, 0 replies; 6+ messages in thread
From: Stephen Hemminger @ 2012-01-03 21:57 UTC (permalink / raw)
To: Jan Engelhardt; +Cc: Linux Networking Developer Mailing List
On Sat, 31 Dec 2011 23:22:05 +0100 (CET)
Jan Engelhardt <jengelh@medozas.de> wrote:
> From: Jan Engelhardt <jengelh@medozas.de>
> Date: 2011-12-31 23:16:27.428349795 +0100
>
> gcc -DLIBDIR=\"/usr/lib64\" -D_GNU_SOURCE -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -Wstrict-prototypes -fPIC -DXT_LIB_DIR=\"/usr/lib64/xtables\" -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib64\" -fPIC -c -o ipx_pton.o ipx_pton.c
> In file included from ../include/utils.h:8:0,
> from ipx_ntop.c:5:
> ../include/libnetlink.h: In function 'rta_getattr_u64':
> ../include/libnetlink.h:84:2: warning: implicit declaration of function 'memcpy'
> ../include/libnetlink.h:84:2: warning: incompatible implicit declaration of built-in function 'memcpy'
>
> diff --git a/include/libnetlink.h b/include/libnetlink.h
> index b237579..b0656ce 100644
> --- a/include/libnetlink.h
> +++ b/include/libnetlink.h
> @@ -1,6 +1,7 @@
> #ifndef __LIBNETLINK_H__
> #define __LIBNETLINK_H__ 1
>
> +#include <string.h>
> #include <asm/types.h>
> #include <linux/netlink.h>
> #include <linux/rtnetlink.h>
Applied.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: iproute2: proper detection of libxtables position and flags
2012-01-03 21:47 ` iproute2: proper detection of libxtables position and flags Stephen Hemminger
@ 2012-01-03 22:18 ` Jan Engelhardt
0 siblings, 0 replies; 6+ messages in thread
From: Jan Engelhardt @ 2012-01-03 22:18 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: Linux Networking Developer Mailing List
On Tuesday 2012-01-03 22:47, Stephen Hemminger wrote:
>On Sat, 31 Dec 2011 23:17:56 +0100 (CET)
>Jan Engelhardt <jengelh@medozas.de> wrote:
>
>> From: Jan Engelhardt <jengelh@medozas.de>
>> Date: 2011-09-24 23:37:34.405739159 +0200
>> Upstream: not sent yet
>>
>> Any tests involving iptables _MUST_ utilize pkg-config to find the
>> proper locations of the installation.
>>
>
>Will this work for all distros? Is this backwards compatiable?
The pkg-config file was shipped since the start, and it is the
one supported variant to find/link the lib.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-01-03 22:18 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-31 22:17 iproute2: proper detection of libxtables position and flags Jan Engelhardt
2011-12-31 22:18 ` iproute2: fix calling up the xt action Jan Engelhardt
2011-12-31 22:22 ` iproute2: avoid use of implicit declarations Jan Engelhardt
2012-01-03 21:57 ` Stephen Hemminger
2012-01-03 21:47 ` iproute2: proper detection of libxtables position and flags Stephen Hemminger
2012-01-03 22:18 ` Jan Engelhardt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).