From 21493ac1b7050334149f41658bfa49aeb6f0f6ac Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppi...@redhat.com>
Date: Thu, 18 Feb 2016 11:54:43 +0100
Subject: Work around bug in kernel headers

---
 IPTables-libiptc-0.52-Exclude-net-if.h.patch | 73 ++++++++++++++++++++++++++++
 perl-IPTables-libiptc.spec                   |  8 ++-
 2 files changed, 80 insertions(+), 1 deletion(-)
 create mode 100644 IPTables-libiptc-0.52-Exclude-net-if.h.patch

diff --git a/IPTables-libiptc-0.52-Exclude-net-if.h.patch 
b/IPTables-libiptc-0.52-Exclude-net-if.h.patch
new file mode 100644
index 0000000..69d7222
--- /dev/null
+++ b/IPTables-libiptc-0.52-Exclude-net-if.h.patch
@@ -0,0 +1,73 @@
+From a449480a5ffafc60663341a15d8f13fc3de420ac Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppi...@redhat.com>
+Date: Thu, 18 Feb 2016 10:53:45 +0100
+Subject: [PATCH] Exclude <net/if.h>
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Incompatible with <linux/if.h> since kernel-headers-4.5.0-0.rc0.git6.1.fc24.
+
+<https://bugzilla.redhat.com/show_bug.cgi?id=1300256>
+
+Signed-off-by: Petr Písař <ppi...@redhat.com>
+---
+ include/libiptc/ipt_kernel_headers.h | 6 +++++-
+ iptables/iptables-detect-version.c   | 5 +++++
+ iptables/xshared.c                   | 6 ++++++
+ 3 files changed, 16 insertions(+), 1 deletion(-)
+
+diff --git a/include/libiptc/ipt_kernel_headers.h 
b/include/libiptc/ipt_kernel_headers.h
+index 18861fe..0713dea 100644
+--- a/include/libiptc/ipt_kernel_headers.h
++++ b/include/libiptc/ipt_kernel_headers.h
+@@ -3,6 +3,10 @@
+ #ifndef _FWCHAINS_KERNEL_HEADERS_H
+ #define _FWCHAINS_KERNEL_HEADERS_H
+ 
++/* Exclude <net/if.h> broken since kernel-headers-4.5.0-0.rc0.git6.1.fc24
++ * <https://bugzilla.redhat.com/show_bug.cgi?id=1300256> */
++#define _NET_IF_H 1
++
+ #include <limits.h>
+ 
+ #if defined(__GLIBC__) && __GLIBC__ == 2
+@@ -11,7 +15,7 @@
+ #include <netinet/ip_icmp.h>
+ #include <netinet/tcp.h>
+ #include <netinet/udp.h>
+-#include <net/if.h>
++#include <linux/if.h>
+ #include <sys/types.h>
+ #else /* libc5 */
+ #include <sys/socket.h>
+diff --git a/iptables/iptables-detect-version.c 
b/iptables/iptables-detect-version.c
+index e87541a..bfe72e1 100644
+--- a/iptables/iptables-detect-version.c
++++ b/iptables/iptables-detect-version.c
+@@ -1,3 +1,8 @@
++/* Exclude <net/if.h> broken since kernel-headers-4.5.0-0.rc0.git6.1.fc24
++ * <https://bugzilla.redhat.com/show_bug.cgi?id=1300256> */
++#define _NET_IF_H 1
++#include <sys/socket.h>
++#include <linux/if.h>
+ 
+ #include <xtables.h>
+ 
+diff --git a/iptables/xshared.c b/iptables/xshared.c
+index ab3f646..5fd2808 100644
+--- a/iptables/xshared.c
++++ b/iptables/xshared.c
+@@ -1,3 +1,9 @@
++/* Exclude <net/if.h> broken since kernel-headers-4.5.0-0.rc0.git6.1.fc24
++ * <https://bugzilla.redhat.com/show_bug.cgi?id=1300256> */
++#define _NET_IF_H 1
++#include <sys/socket.h>
++#include <linux/if.h>
++
+ #include <xtables.h>
+ 
+ #if   XTABLES_VERSION_CODE < 7
+-- 
+2.5.0
+
diff --git a/perl-IPTables-libiptc.spec b/perl-IPTables-libiptc.spec
index 762789d..5a8f4d3 100644
--- a/perl-IPTables-libiptc.spec
+++ b/perl-IPTables-libiptc.spec
@@ -1,6 +1,6 @@
 Name:           perl-IPTables-libiptc
 Version:        0.52
-Release:        14%{?dist}
+Release:        15%{?dist}
 Summary:        Perl extension for iptables libiptc
 License:        GPLv2+
 Group:          Development/Libraries
@@ -14,6 +14,8 @@ Patch1:         
IPTables-libiptc-0.52-Support-for-1.4.16.2.patch
 Patch2:         IPTables-libiptc-0.52-Support-for-1.4.18.patch
 # croak() expects formatting string, bug #1106081
 Patch3:         IPTables-libiptc-0.52-Fix-GCC-format-security-warning.patch
+# Work around bug in kernel headers, bug #1300223
+Patch4:         IPTables-libiptc-0.52-Exclude-net-if.h.patch
 BuildRequires:  iptables-devel >= 1.4.4
 BuildRequires:  perl
 BuildRequires:  perl(ExtUtils::MakeMaker)
@@ -37,6 +39,7 @@ library libiptc.
 %patch1 -p1 -b .1416
 %patch2 -p1 -b .1418
 %patch3 -p1
+%patch4 -p1
 
 %build
 perl Makefile.PL PREFIX=%{_prefix} INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS"
@@ -58,6 +61,9 @@ make test
 %{_mandir}/man3/*
 
 %changelog
+* Thu Feb 18 2016 Petr Pisar <ppi...@redhat.com> - 0.52-15
+- Work around bug in kernel headers (bug #1300223)
+
 * Thu Feb 04 2016 Fedora Release Engineering <rel...@fedoraproject.org> - 
0.52-14
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
 
-- 
cgit v0.12


        
http://pkgs.fedoraproject.org/cgit/perl-IPTables-libiptc.git/commit/?h=master&id=21493ac1b7050334149f41658bfa49aeb6f0f6ac
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@lists.fedoraproject.org
http://lists.fedoraproject.org/admin/lists/perl-devel@lists.fedoraproject.org

Reply via email to