]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
iptables and NO_SHARED_LIBS/dlfcn.h
authorMike Frysinger <vapier@gentoo.org>
Wed, 19 Dec 2007 14:51:17 +0000 (14:51 +0000)
committerPatrick McHardy <kaber@trash.net>
Wed, 19 Dec 2007 14:51:17 +0000 (14:51 +0000)
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>
ip6tables-save.c
iptables-save.c
xtables.c

index d828404ca1a3ecaa0c233689e6ad7bd3478dbb00..af86f4b37ef6183b95cb5a583321fde95de0e4f1 100644 (file)
 #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[] = {
index 0765361dac37f7ba5fa242bd757451770b28198c..be5e8936d529881063016176adfb0ea237b6ea45 100644 (file)
 #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 3cc864b203ee9566f945351bb6af70371a65a2ec..b8c2c6f4f36498c827f312c58feacebed887d419 100644 (file)
--- a/xtables.c
+++ b/xtables.c
@@ -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>
 
 #include <xtables.h>
 
+#ifndef NO_SHARED_LIBS
+#include <dlfcn.h>
+#endif
+
 #define NPROTO 255
 
 #ifndef PROC_SYS_MODPROBE