iptables and NO_SHARED_LIBS/dlfcn.h
PATCH 1/1 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.
---
i'd file a bug on the netfilter bugzilla, but looks like the system is hosed ...
iptables-save.c +4 -1
@@ -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[] = {
xtables.c +4 -1
@@ -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
ip6tables-save.c +4 -1
@@ -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[] = {
Quoted 5 lines · Mike Frysinger
if
NO_SHARED_LIBSis defined, then iptables shouldnt even includedlfcn.h. otherwise you hit a build failure when using toolchains that do not providedlfcn.hbecause they do not support shared objects.
Ideally such things would be done by autotools. Patch still floating :)
Quoted 7 lines · Jan Engelhardt
Quoted 4 lines · Mike Frysinger
if
NO_SHARED_LIBSis defined, then iptables shouldnt even includedlfcn.h. otherwise you hit a build failure when using toolchains that do not providedlfcn.hbecause 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
Patrick McHardy
AppliedQuoted 3 lines · Mike Frysinger
if
NO_SHARED_LIBSis defined, then iptables shouldnt even includedlfcn.h. otherwise you hit a build failure when using toolchains that do not providedlfcn.hbecause they do not support shared objects.
Applied, thanks. With some luck Pablo hasn't started preparing the 1.4.0 release yet :)
Pablo Neira Ayuso
maintainerQuoted 7 lines · Patrick McHardy
Quoted 3 lines · Mike Frysinger
if
NO_SHARED_LIBSis defined, then iptables shouldnt even includedlfcn.h. otherwise you hit a build failure when using toolchains that do not providedlfcn.hbecause 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 :(