diff options
author | Timo Teräs <timo.teras@iki.fi> | 2013-09-29 11:26:24 +0000 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2013-09-29 11:26:24 +0000 |
commit | 3c6df09b389734f308af2ad5c164a229fe18229d (patch) | |
tree | c5278ee793afc0789b7762f01cbb322529ed1983 /main/iptables | |
parent | a9c885b5cc3415615922bd5aa30d6a7436821a51 (diff) | |
download | aports-3c6df09b389734f308af2ad5c164a229fe18229d.tar.bz2 aports-3c6df09b389734f308af2ad5c164a229fe18229d.tar.xz |
main/iptables: fix musl build
patch from sabotage.
Diffstat (limited to 'main/iptables')
-rw-r--r-- | main/iptables/APKBUILD | 6 | ||||
-rw-r--r-- | main/iptables/iptables-1.4.14-musl-fixes.patch | 127 |
2 files changed, 133 insertions, 0 deletions
diff --git a/main/iptables/APKBUILD b/main/iptables/APKBUILD index ba531c0792..75d0c06449 100644 --- a/main/iptables/APKBUILD +++ b/main/iptables/APKBUILD @@ -8,6 +8,8 @@ url="http://www.netfilter.org/projects/iptables/index.html" arch="all" license=GPL-2 source="http://ftp.netfilter.org/pub/iptables/iptables-$pkgver.tar.bz2 + iptables-1.4.14-musl-fixes.patch + iptables.initd iptables.confd ip6tables.confd @@ -31,6 +33,7 @@ prepare() { build() { cd "$srcdir/$pkgname-$pkgver" + export CFLAGS="$CFLAGS -D_GNU_SOURCE" ./configure \ --build=$CBUILD \ --host=$CHOST \ @@ -85,14 +88,17 @@ ip6tables() { } md5sums="be97ce9007fa42c867901b496c935a0a iptables-1.4.19.1.tar.bz2 +cd9f429bf0dbd73be5f95bf0d7169728 iptables-1.4.14-musl-fixes.patch f73fb9a0b9fe42a19d1109b415d86c9c iptables.initd c91286c54f8fe0de6ed8950f375cb7a5 iptables.confd d3f37ebc2cd3fbfc326c3a8df5a79e11 ip6tables.confd" sha256sums="dd51d3b942758a462afc7c8495930d25c93058e5319303247375183ad50164d2 iptables-1.4.19.1.tar.bz2 +3ad64af68ea70aa6de0649a68176c2ac68e1c0db567babb472648695dbff8f90 iptables-1.4.14-musl-fixes.patch b6a4a5bf1b8fdb3f7d29f016042ff0adc99deca5d50f66fc915f840c61e9969a iptables.initd 421acbcd310f9c51e20e22e59af9452b1ba5d0db33e8960eba0095271060c3db iptables.confd 31ef5d759c64afd0ecbcb56b3982ed2bdb5ed9c8553c628c13d4a3b5687118a3 ip6tables.confd" sha512sums="a3232ae92b997f67b5895c110f2cb8ec3aecbc383e804a870351c61e49cd83c1d7bf750818768f5560d615090157a17cc5c4ef101bc104905915de67fa022088 iptables-1.4.19.1.tar.bz2 +bc1cb36957d5afb80b770fe15f951de3074e2b1b28015372fb6f121fd551dd0e86c76c1819022dc468d11750b3969db40ef2dc9651c654c9f99212c0f2746985 iptables-1.4.14-musl-fixes.patch d0e6ed38bf6fd74a280d8b219667cda9b1287692a4776e33a47d6f7bba10cd537a3462c23245baee150c6126a5fb7a81b7299f3087bcfddc22a45fef8d5d1fad iptables.initd cb7fecd5cab2c78bd3f215a41f39ec11c37eb360efbe83982378a0e647e0aa9dc0b7ec915a5b5081aa2f7747464787e69404aa15ba15a063c32cb8fb7dd13d1e iptables.confd 0897a7a22f8b700f7f1f5c355ad6cbf39740e44d6c962af99e479978d8a2d556ca7fe4e31f238829046b4a871ce0b5fd52e2544f1361d15dd1ea3e33992646c4 ip6tables.confd" diff --git a/main/iptables/iptables-1.4.14-musl-fixes.patch b/main/iptables/iptables-1.4.14-musl-fixes.patch new file mode 100644 index 0000000000..547d0df42e --- /dev/null +++ b/main/iptables/iptables-1.4.14-musl-fixes.patch @@ -0,0 +1,127 @@ +--- iptables-1.4.12.1.o/extensions/libip6t_ipv6header.c ++++ iptables-1.4.12.1/extensions/libip6t_ipv6header.c +@@ -10,6 +10,9 @@ + #include <netdb.h> + #include <xtables.h> + #include <linux/netfilter_ipv6/ip6t_ipv6header.h> ++#ifndef IPPROTO_HOPOPTS ++# define IPPROTO_HOPOPTS 0 ++#endif + + enum { + O_HEADER = 0, +--- iptables-1.4.12.1.o/extensions/libxt_TCPOPTSTRIP.c ++++ iptables-1.4.12.1/extensions/libxt_TCPOPTSTRIP.c +@@ -12,6 +12,21 @@ + #ifndef TCPOPT_MD5SIG + # define TCPOPT_MD5SIG 19 + #endif ++#ifndef TCPOPT_MAXSEG ++# define TCPOPT_MAXSEG 2 ++#endif ++#ifndef TCPOPT_WINDOW ++# define TCPOPT_WINDOW 3 ++#endif ++#ifndef TCPOPT_SACK_PERMITTED ++# define TCPOPT_SACK_PERMITTED 4 ++#endif ++#ifndef TCPOPT_SACK ++# define TCPOPT_SACK 5 ++#endif ++#ifndef TCPOPT_TIMESTAMP ++# define TCPOPT_TIMESTAMP 8 ++#endif + + enum { + O_STRIP_OPTION = 0, +--- iptables-1.4.12.1.o/include/libiptc/ipt_kernel_headers.h ++++ iptables-1.4.12.1/include/libiptc/ipt_kernel_headers.h +@@ -5,7 +5,6 @@ + + #include <limits.h> + +-#if defined(__GLIBC__) && __GLIBC__ == 2 + #include <netinet/ip.h> + #include <netinet/in.h> + #include <netinet/ip_icmp.h> +@@ -13,15 +12,4 @@ + #include <netinet/udp.h> + #include <net/if.h> + #include <sys/types.h> +-#else /* libc5 */ +-#include <sys/socket.h> +-#include <linux/ip.h> +-#include <linux/in.h> +-#include <linux/if.h> +-#include <linux/icmp.h> +-#include <linux/tcp.h> +-#include <linux/udp.h> +-#include <linux/types.h> +-#include <linux/in6.h> +-#endif + #endif +--- iptables-1.4.12.1.o/include/linux/netfilter_ipv4/ip_tables.h ++++ iptables-1.4.12.1/include/linux/netfilter_ipv4/ip_tables.h +@@ -16,6 +16,7 @@ + #define _IPTABLES_H + + #include <linux/types.h> ++#include <sys/types.h> + + #include <linux/netfilter_ipv4.h> + +--- iptables-1.4.12.1.o/iptables/ip6tables-restore.c ++++ iptables-1.4.12.1/iptables/ip6tables-restore.c +@@ -9,7 +9,7 @@ + */ + + #include <getopt.h> +-#include <sys/errno.h> ++#include <errno.h> + #include <stdbool.h> + #include <string.h> + #include <stdio.h> +--- iptables-1.4.12.1.o/iptables/ip6tables-save.c ++++ iptables-1.4.12.1/iptables/ip6tables-save.c +@@ -6,7 +6,7 @@ + * This code is distributed under the terms of GNU GPL v2 + */ + #include <getopt.h> +-#include <sys/errno.h> ++#include <errno.h> + #include <stdio.h> + #include <fcntl.h> + #include <stdlib.h> +--- iptables-1.4.12.1.o/iptables/iptables-restore.c ++++ iptables-1.4.12.1/iptables/iptables-restore.c +@@ -6,7 +6,7 @@ + */ + + #include <getopt.h> +-#include <sys/errno.h> ++#include <errno.h> + #include <stdbool.h> + #include <string.h> + #include <stdio.h> +--- iptables-1.4.12.1.o/iptables/iptables-save.c ++++ iptables-1.4.12.1/iptables/iptables-save.c +@@ -6,7 +6,7 @@ + * + */ + #include <getopt.h> +-#include <sys/errno.h> ++#include <errno.h> + #include <stdio.h> + #include <fcntl.h> + #include <stdlib.h> +--- iptables-1.4.12.1.o/iptables/iptables-xml.c ++++ iptables-1.4.12.1/iptables/iptables-xml.c +@@ -7,7 +7,7 @@ + */ + + #include <getopt.h> +-#include <sys/errno.h> ++#include <errno.h> + #include <string.h> + #include <stdio.h> + #include <stdlib.h> |