* [patch] iptables and NO_SHARED_LIBS/dlfcn.h
@ 2007-12-19 12:15 Mike Frysinger
2007-12-19 12:18 ` Jan Engelhardt
2007-12-19 14:40 ` Patrick McHardy
0 siblings, 2 replies; 5+ messages in thread
From: Mike Frysinger @ 2007-12-19 12:15 UTC (permalink / raw)
To: netfilter-devel
if NO_SHARED_LIBS is defined, then iptables shouldnt even include dlfcn.h.
otherwise you hit a build failure when using toolchains that do not provide
dlfcn.h because they do not support shared objects.
Signed-Off-By: Mike Frysinger <vapier@gentoo.org>
---
i'd file a bug on the netfilter bugzilla, but looks like the system is hosed ...
Index: iptables-save.c
===================================================================
--- iptables-save.c (revision 7145)
+++ iptables-save.c (working copy)
@@ -11,12 +11,15 @@
#include <fcntl.h>
#include <stdlib.h>
#include <string.h>
-#include <dlfcn.h>
#include <time.h>
#include <netdb.h>
#include "libiptc/libiptc.h"
#include "iptables.h"
+#ifndef NO_SHARED_LIBS
+#include <dlfcn.h>
+#endif
+
static int binary = 0, counters = 0;
static struct option options[] = {
Index: xtables.c
===================================================================
--- xtables.c (revision 7145)
+++ xtables.c (working copy)
@@ -16,7 +16,6 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#include <dlfcn.h>
#include <errno.h>
#include <fcntl.h>
#include <netdb.h>
@@ -31,6 +30,10 @@
#include <xtables.h>
+#ifndef NO_SHARED_LIBS
+#include <dlfcn.h>
+#endif
+
#define NPROTO 255
#ifndef PROC_SYS_MODPROBE
Index: ip6tables-save.c
===================================================================
--- ip6tables-save.c (revision 7145)
+++ ip6tables-save.c (working copy)
@@ -11,13 +11,16 @@
#include <fcntl.h>
#include <stdlib.h>
#include <string.h>
-#include <dlfcn.h>
#include <time.h>
#include <netdb.h>
#include <arpa/inet.h>
#include "libiptc/libip6tc.h"
#include "ip6tables.h"
+#ifndef NO_SHARED_LIBS
+#include <dlfcn.h>
+#endif
+
static int binary = 0, counters = 0;
static struct option options[] = {
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [patch] iptables and NO_SHARED_LIBS/dlfcn.h
2007-12-19 12:15 [patch] iptables and NO_SHARED_LIBS/dlfcn.h Mike Frysinger
@ 2007-12-19 12:18 ` Jan Engelhardt
2007-12-19 12:49 ` Mike Frysinger
2007-12-19 14:40 ` Patrick McHardy
1 sibling, 1 reply; 5+ messages in thread
From: Jan Engelhardt @ 2007-12-19 12:18 UTC (permalink / raw)
To: Mike Frysinger; +Cc: netfilter-devel
On Dec 19 2007 07:15, Mike Frysinger wrote:
>
>if NO_SHARED_LIBS is defined, then iptables shouldnt even include
>dlfcn.h. otherwise you hit a build failure when using toolchains
>that do not provide dlfcn.h because they do not support shared
>objects.
Ideally such things would be done by autotools. Patch still floating :)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [patch] iptables and NO_SHARED_LIBS/dlfcn.h
2007-12-19 12:18 ` Jan Engelhardt
@ 2007-12-19 12:49 ` Mike Frysinger
0 siblings, 0 replies; 5+ messages in thread
From: Mike Frysinger @ 2007-12-19 12:49 UTC (permalink / raw)
To: Jan Engelhardt; +Cc: netfilter-devel
[-- Attachment #1: Type: text/plain, Size: 520 bytes --]
On Wednesday 19 December 2007, Jan Engelhardt wrote:
> On Dec 19 2007 07:15, Mike Frysinger wrote:
> >if NO_SHARED_LIBS is defined, then iptables shouldnt even include
> >dlfcn.h. otherwise you hit a build failure when using toolchains
> >that do not provide dlfcn.h because they do not support shared
> >objects.
>
> Ideally such things would be done by autotools. Patch still floating :)
i agree 100%, but i work with what i've got, and what i've got is svn trunk
which is still just a Makefile ;)
-mike
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 827 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [patch] iptables and NO_SHARED_LIBS/dlfcn.h
2007-12-19 12:15 [patch] iptables and NO_SHARED_LIBS/dlfcn.h Mike Frysinger
2007-12-19 12:18 ` Jan Engelhardt
@ 2007-12-19 14:40 ` Patrick McHardy
2007-12-19 16:32 ` Pablo Neira Ayuso
1 sibling, 1 reply; 5+ messages in thread
From: Patrick McHardy @ 2007-12-19 14:40 UTC (permalink / raw)
To: Mike Frysinger; +Cc: netfilter-devel
Mike Frysinger wrote:
> if NO_SHARED_LIBS is defined, then iptables shouldnt even include dlfcn.h.
> otherwise you hit a build failure when using toolchains that do not provide
> dlfcn.h because they do not support shared objects.
Applied, thanks. With some luck Pablo hasn't started preparing the 1.4.0
release yet :)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [patch] iptables and NO_SHARED_LIBS/dlfcn.h
2007-12-19 14:40 ` Patrick McHardy
@ 2007-12-19 16:32 ` Pablo Neira Ayuso
0 siblings, 0 replies; 5+ messages in thread
From: Pablo Neira Ayuso @ 2007-12-19 16:32 UTC (permalink / raw)
To: Patrick McHardy; +Cc: Mike Frysinger, netfilter-devel
Patrick McHardy wrote:
> Mike Frysinger wrote:
>> if NO_SHARED_LIBS is defined, then iptables shouldnt even include
>> dlfcn.h.
>> otherwise you hit a build failure when using toolchains that do not
>> provide
>> dlfcn.h because they do not support shared objects.
>
> Applied, thanks. With some luck Pablo hasn't started preparing the 1.4.0
> release yet :)
I didn't yet, I'll probably do tomorrow or friday. I forgot that this
week is plenty of checkpoint exams :(
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-12-19 16:45 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-19 12:15 [patch] iptables and NO_SHARED_LIBS/dlfcn.h Mike Frysinger
2007-12-19 12:18 ` Jan Engelhardt
2007-12-19 12:49 ` Mike Frysinger
2007-12-19 14:40 ` Patrick McHardy
2007-12-19 16:32 ` Pablo Neira Ayuso
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.