From 7c07b7fd4fdd7844dd032af822306f08e4422c34 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Mon, 6 Apr 2015 20:47:29 -0700 Subject: [PATCH] fix build with musl Add needed headers they are just not needed for glibc6+ but also for musl Define additional TCOPTS if not there u_initX types are in sys/types.h be explicit about it Upstream-Status: Pending Signed-off-by: Khem Raj --- extensions/libxt_TCPOPTSTRIP.c | 15 +++++++++++++++ include/libiptc/ipt_kernel_headers.h | 12 ------------ include/linux/netfilter_ipv4/ip_tables.h | 1 + 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/extensions/libxt_TCPOPTSTRIP.c b/extensions/libxt_TCPOPTSTRIP.c index 6897857..8a170b2 100644 --- a/extensions/libxt_TCPOPTSTRIP.c +++ b/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, diff --git a/include/libiptc/ipt_kernel_headers.h b/include/libiptc/ipt_kernel_headers.h index 18861fe..a5963e9 100644 --- a/include/libiptc/ipt_kernel_headers.h +++ b/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 diff --git a/include/linux/netfilter_ipv4/ip_tables.h b/include/linux/netfilter_ipv4/ip_tables.h index 57fd82a..4807246 100644 --- a/include/linux/netfilter_ipv4/ip_tables.h +++ b/include/linux/netfilter_ipv4/ip_tables.h @@ -15,6 +15,7 @@ #ifndef _IPTABLES_H #define _IPTABLES_H +#include #include #include -- 2.1.4