diff options
author | /C=EU/ST=EU/CN=Patrick McHardy/emailAddress=kaber@trash.net </C=EU/ST=EU/CN=Patrick McHardy/emailAddress=kaber@trash.net> | 2007-12-19 14:51:17 +0000 |
---|---|---|
committer | /C=EU/ST=EU/CN=Patrick McHardy/emailAddress=kaber@trash.net </C=EU/ST=EU/CN=Patrick McHardy/emailAddress=kaber@trash.net> | 2007-12-19 14:51:17 +0000 |
commit | 9a2da3bc02feed33d86ec837b64bc4295f86bb51 (patch) | |
tree | 7c852a9392996ca1bff4eaf6b42823ed746b1935 | |
parent | 126ad50b16852c0a79ec72e43d5f5dfd9f10380a (diff) |
[patch] iptables and NO_SHARED_LIBS/dlfcn.h
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>
-rw-r--r-- | ip6tables-save.c | 5 | ||||
-rw-r--r-- | iptables-save.c | 5 | ||||
-rw-r--r-- | xtables.c | 5 |
3 files changed, 12 insertions, 3 deletions
diff --git a/ip6tables-save.c b/ip6tables-save.c index d828404..af86f4b 100644 --- a/ip6tables-save.c +++ b/ip6tables-save.c @@ -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[] = { diff --git a/iptables-save.c b/iptables-save.c index 0765361..be5e893 100644 --- a/iptables-save.c +++ b/iptables-save.c @@ -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[] = { @@ -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 |