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