musl-compat: avoid kernel header conflicts
authorRalph Sennhauser <ralph.sennhauser@gmail.com>
Sun, 6 Nov 2016 09:59:43 +0000 (10:59 +0100)
committerJo-Philipp Wich <jo@mein.io>
Sun, 6 Nov 2016 19:21:12 +0000 (20:21 +0100)
The conflict between Musls net/if.h and linux/if.h is an old well known
one and taken care of by a series of linux-headers patches in OpenWrt.
Since Linux 4.8-rc5 Firewall3 also indirectly pulls in linux/in.h and
linux/in6.h leading to new conflicts.

As Firewall3 is fine with just the libc headers prevent inclusion of the
corresponding kernel headers.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
iptables.h
options.h

index a2c733d..491e598 100644 (file)
@@ -21,6 +21,9 @@
 
 #define _GNU_SOURCE /* RTLD_NEXT */
 
+#define _LINUX_IF_H
+#define _LINUX_IN_H
+#define _LINUX_IN6_H
 #include <libiptc/libiptc.h>
 #include <libiptc/libip6tc.h>
 #include <xtables.h>
index 6c9c0b2..307c5af 100644 (file)
--- a/options.h
+++ b/options.h
@@ -32,6 +32,8 @@
 #include <netdb.h>
 #include <arpa/inet.h>
 #include <sys/socket.h>
+#define _LINUX_IN_H
+#define _LINUX_IN6_H
 #include <netinet/in.h>
 #include <netinet/ether.h>