All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: netfilter-devel@vger.kernel.org
Subject: [patch] iptables and NO_SHARED_LIBS/dlfcn.h
Date: Wed, 19 Dec 2007 07:15:46 -0500	[thread overview]
Message-ID: <200712190715.46466.vapier@gentoo.org> (raw)

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[] = {

             reply	other threads:[~2007-12-19 12:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-19 12:15 Mike Frysinger [this message]
2007-12-19 12:18 ` [patch] iptables and NO_SHARED_LIBS/dlfcn.h Jan Engelhardt
2007-12-19 12:49   ` Mike Frysinger
2007-12-19 14:40 ` Patrick McHardy
2007-12-19 16:32   ` Pablo Neira Ayuso

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200712190715.46466.vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=netfilter-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.