use normal kernel headers, not linux/compiler.h

This commit is contained in:
Tom Callaway 2008-06-06 18:59:22 +00:00
parent 175162e6e7
commit 1a6c05b472
2 changed files with 42 additions and 2 deletions

View File

@ -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 <linux/compiler.h>
+// #include <linux/compiler.h>
+#ifndef __user
+#define __user
+#endif
+
#include <linux/netfilter_ipv4.h>
#include <linux/netfilter/x_tables.h>
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 <linux/compiler.h>
+// #include <linux/compiler.h>
+#ifndef __user
+#define __user
+#endif
+
#include <linux/netfilter_ipv6.h>
#include <linux/netfilter/x_tables.h>

View File

@ -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 <tcallawa@redhat.com> 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 <twoerner@redhat.com> 1.4.0-4
- use O_CLOEXEC for all opened files in all applications (rhbz#438189)