From b6de55a4f2a774f5e6d38fe6acf0a808bcb3081e Mon Sep 17 00:00:00 2001 From: Juan RP Date: Mon, 10 Nov 2014 16:36:04 +0100 Subject: [PATCH] iptables: unbreak musl build; patch from Alpine. --- .../patches/iptables-1.4.14-musl-fixes.patch | 127 ++++++++++++++++++ srcpkgs/iptables/template | 2 +- 2 files changed, 128 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/iptables/patches/iptables-1.4.14-musl-fixes.patch diff --git a/srcpkgs/iptables/patches/iptables-1.4.14-musl-fixes.patch b/srcpkgs/iptables/patches/iptables-1.4.14-musl-fixes.patch new file mode 100644 index 00000000000..16e86a61eb7 --- /dev/null +++ b/srcpkgs/iptables/patches/iptables-1.4.14-musl-fixes.patch @@ -0,0 +1,127 @@ +--- extensions/libip6t_ipv6header.c ++++ extensions/libip6t_ipv6header.c +@@ -10,6 +10,9 @@ + #include + #include + #include ++#ifndef IPPROTO_HOPOPTS ++# define IPPROTO_HOPOPTS 0 ++#endif + + enum { + O_HEADER = 0, +--- extensions/libxt_TCPOPTSTRIP.c ++++ 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, +--- include/libiptc/ipt_kernel_headers.h ++++ include/libiptc/ipt_kernel_headers.h +@@ -5,7 +5,6 @@ + + #include + +-#if defined(__GLIBC__) && __GLIBC__ == 2 + #include + #include + #include +@@ -13,15 +12,4 @@ + #include + #include + #include +-#else /* libc5 */ +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#endif + #endif +--- include/linux/netfilter_ipv4/ip_tables.h ++++ include/linux/netfilter_ipv4/ip_tables.h +@@ -16,6 +16,7 @@ + #define _IPTABLES_H + + #include ++#include + + #include + +--- iptables/ip6tables-restore.c ++++ iptables/ip6tables-restore.c +@@ -9,7 +9,7 @@ + */ + + #include +-#include ++#include + #include + #include + #include +--- iptables/ip6tables-save.c ++++ iptables/ip6tables-save.c +@@ -6,7 +6,7 @@ + * This code is distributed under the terms of GNU GPL v2 + */ + #include +-#include ++#include + #include + #include + #include +--- iptables/iptables-restore.c ++++ iptables/iptables-restore.c +@@ -6,7 +6,7 @@ + */ + + #include +-#include ++#include + #include + #include + #include +--- iptables/iptables-save.c ++++ iptables/iptables-save.c +@@ -6,7 +6,7 @@ + * + */ + #include +-#include ++#include + #include + #include + #include +--- iptables/iptables-xml.c ++++ iptables/iptables-xml.c +@@ -7,7 +7,7 @@ + */ + + #include +-#include ++#include + #include + #include + #include diff --git a/srcpkgs/iptables/template b/srcpkgs/iptables/template index 631439c75da..ddac6d91f9b 100644 --- a/srcpkgs/iptables/template +++ b/srcpkgs/iptables/template @@ -1,7 +1,7 @@ # Template file for 'iptables' pkgname=iptables version=1.4.21 -revision=2 +revision=4 build_style=gnu-configure build_options="systemd" configure_args="--enable-libipq --enable-shared --enable-devel --enable-bpf-compiler"