Browse Source

musl: fix iptables package

stable/0.6
Christian Wiese 11 years ago
parent
commit
5ad12aab14
  1. 143
      base/musl/pkg/iptables/0001-musl-fixes.patch
  2. 17
      base/musl/pkg/iptables/iptables.conf

143
base/musl/pkg/iptables/0001-musl-fixes.patch

@ -0,0 +1,143 @@
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../musl/pkg/iptables/0001-musl-fixes.patch
# Copyright (C) 2013 The OpenSDE Project
#
# More information can be found in the files COPYING and README.
#
# This patch file is dual-licensed. It is available under the license the
# patched project is licensed under, as long as it is an OpenSource license
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
# of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
# --- SDE-COPYRIGHT-NOTE-END ---
--- 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>

17
base/musl/pkg/iptables/iptables.conf

@ -0,0 +1,17 @@
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# Filename: package/.../musl/pkg/iptables/iptables.conf
# Copyright (C) 2013 The OpenSDE Project
#
# More information can be found in the files COPYING and README.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License. A copy of the
# GNU General Public License can be found in the file COPYING.
# --- SDE-COPYRIGHT-NOTE-END ---
# in musl struct tcphdr is exposed when defining _GNU_SOURCE
var_append CFLAGS ' ' "-D_GNU_SOURCE"
var_append configprefix ' ' "CFLAGS=$CFLAGS"
Loading…
Cancel
Save