From 3b61f64323aa0567bf26379bd07d730ab6f72d3331e3cfdf2f9384dce30fe769 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Mon, 1 Aug 2011 18:46:26 +0000 Subject: [PATCH] Make build work for Fedorean systems OBS-URL: https://build.opensuse.org/package/show/security:netfilter/iptables?expand=0&rev=23 --- iptables.spec | 8 +++++++- proc-header.diff | 30 ++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 proc-header.diff diff --git a/iptables.spec b/iptables.spec index ae9417b..dc898b7 100644 --- a/iptables.spec +++ b/iptables.spec @@ -30,6 +30,7 @@ Summary: IP Packet Filter Administration #Git-Clone: git://git.netfilter.org/iptables Source: %name-%version.tar.xz Patch1: iptables-batch.patch +Patch2: proc-header.diff Url: http://netfilter.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-build %if 0%{?suse_version} @@ -58,8 +59,13 @@ These libraries are needed to compile - programs using libipq %prep +%if 0%{?__xz:1} %setup -q -%patch -P 1 -p1 +%else +tar -xf "%{S:0}" --use=xz; +%setup -DTq +%endif +%patch -P 1 -P 2 -p1 %build if [ ! -e configure ]; then diff --git a/proc-header.diff b/proc-header.diff new file mode 100644 index 0000000..9d9dbea --- /dev/null +++ b/proc-header.diff @@ -0,0 +1,30 @@ +parent 67156c0b9a3d35f5e7836e5683d8ca0b46ac36ca (v1.4.11.1-34-g67156c0) +commit 41a9b481693b4c43c16d0588cc558dd455168af0 +Author: Jan Engelhardt +Date: Mon Aug 1 20:14:57 2011 +0200 + +build: workaround broken linux-headers on RHEL-5 + +maigc.h was not invented yet, but they do not +ship proc_fs.h either, duh. + +Signed-off-by: Jan Engelhardt +--- + iptables/xtables.c | 2 ++ + 1 files changed, 2 insertions(+), 0 deletions(-) + +diff --git a/iptables/xtables.c b/iptables/xtables.c +index 1a5e568..233efa3 100644 +--- a/iptables/xtables.c ++++ b/iptables/xtables.c +@@ -37,6 +37,8 @@ + # include /* for PROC_SUPER_MAGIC */ + #elif defined(HAVE_LINUX_PROC_FS_H) + # include /* Linux 2.4 */ ++#else ++# define PROC_SUPER_MAGIC 0x9fa0 + #endif + + #include +-- +# Created with git-export-patch