diff --git a/iptables-1.4.0-use-normal-kernel-headers.patch b/iptables-1.4.0-use-normal-kernel-headers.patch new file mode 100644 index 0000000..843ee63 --- /dev/null +++ b/iptables-1.4.0-use-normal-kernel-headers.patch @@ -0,0 +1,32 @@ +diff -up iptables-1.4.0/include/linux/netfilter_ipv4/ip_tables.h.BAD iptables-1.4.0/include/linux/netfilter_ipv4/ip_tables.h +--- iptables-1.4.0/include/linux/netfilter_ipv4/ip_tables.h.BAD 2008-06-06 12:49:45.000000000 -0500 ++++ iptables-1.4.0/include/linux/netfilter_ipv4/ip_tables.h 2008-06-06 12:54:14.000000000 -0500 +@@ -15,7 +15,11 @@ + #ifndef _IPTABLES_H + #define _IPTABLES_H + +-#include ++// #include ++#ifndef __user ++#define __user ++#endif ++ + #include + + #include +diff -up iptables-1.4.0/include/linux/netfilter_ipv6/ip6_tables.h.BAD iptables-1.4.0/include/linux/netfilter_ipv6/ip6_tables.h +--- iptables-1.4.0/include/linux/netfilter_ipv6/ip6_tables.h.BAD 2008-06-06 12:50:00.000000000 -0500 ++++ iptables-1.4.0/include/linux/netfilter_ipv6/ip6_tables.h 2008-06-06 12:54:27.000000000 -0500 +@@ -15,7 +15,11 @@ + #ifndef _IP6_TABLES_H + #define _IP6_TABLES_H + +-#include ++// #include ++#ifndef __user ++#define __user ++#endif ++ + #include + + #include diff --git a/iptables.spec b/iptables.spec index 53022f8..a992e58 100644 --- a/iptables.spec +++ b/iptables.spec @@ -4,7 +4,7 @@ Name: iptables Summary: Tools for managing Linux kernel packet filtering capabilities Version: 1.4.0 -Release: 4%{?dist} +Release: 5%{?dist} Source: http://www.netfilter.org/projects/iptables/files/%{name}-%{version}.tar.bz2 Source1: iptables.init Source2: iptables-config @@ -12,12 +12,13 @@ Patch0: iptables-1.3.8-iptc.patch Patch4: iptables-1.3.8-typo_latter.patch Patch5: iptables-1.4.0-cloexec.patch Patch6: iptables-1.4.0-in6_u.patch +Patch7: iptables-1.4.0-use-normal-kernel-headers.patch Group: System Environment/Base URL: http://www.netfilter.org/ BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) License: GPLv2 BuildRequires: libselinux-devel -BuildRequires: kernel-devel +BuildRequires: kernel-headers Conflicts: kernel < 2.4.20 Requires(post): chkconfig Requires(preun): chkconfig @@ -62,6 +63,7 @@ stable and may change with every new version. It is therefore unsupported. %patch4 -p1 -b .typo_latter %patch5 -p1 -b .cloexec %patch6 -p1 -b .in6_u +%patch7 -p1 -b .use_normal_headers # Put it to a reasonable place find . -type f -exec perl -pi -e "s,/usr/local,%{_prefix},g" {} \; @@ -163,6 +165,12 @@ fi %endif %changelog +* Fri Jun 6 2008 Tom "spot" Callaway 1.4.0-5 +- use normal kernel headers, not linux/compiler.h +- change BuildRequires: kernel-devel to kernel-headers +- We need to do this to be able to build for both sparcv9 and sparc64 + (there is no kernel-devel.sparcv9) + * Thu Mar 20 2008 Thomas Woerner 1.4.0-4 - use O_CLOEXEC for all opened files in all applications (rhbz#438189)