From 2db43b15c843ced3fb30384f17113226577f3168 Mon Sep 17 00:00:00 2001
From: Paul Howarth <p...@city-fan.org>
Date: Mon, 18 Jan 2016 15:19:50 +0000
Subject: Fix FTBFS on armv7hl

---
 IO-AIO-4.33-constants.patch | 22 ++++++++++++++++++++++
 perl-IO-AIO.spec            |  6 ++++++
 2 files changed, 28 insertions(+)
 create mode 100644 IO-AIO-4.33-constants.patch

diff --git a/IO-AIO-4.33-constants.patch b/IO-AIO-4.33-constants.patch
new file mode 100644
index 0000000..84a0378
--- /dev/null
+++ b/IO-AIO-4.33-constants.patch
@@ -0,0 +1,22 @@
+--- def0.h
++++ def0.h
+@@ -192,6 +192,9 @@
+ #ifndef MAP_SHARED
+ #define MAP_SHARED 0
+ #endif
++#ifndef MAP_32BIT
++#define MAP_32BIT 0
++#endif
+ #ifndef MAP_ANONYMOUS
+ #define MAP_ANONYMOUS 0
+ #endif
+@@ -210,6 +213,9 @@
+ #ifndef MAP_NONBLOCK
+ #define MAP_NONBLOCK 0
+ #endif
++#ifndef MAP_STACK
++#define MAP_STACK 0
++#endif
+ #ifndef FIEMAP_FLAG_SYNC
+ #define FIEMAP_FLAG_SYNC 0
+ #endif
diff --git a/perl-IO-AIO.spec b/perl-IO-AIO.spec
index 51bc0b7..4d57fee 100644
--- a/perl-IO-AIO.spec
+++ b/perl-IO-AIO.spec
@@ -13,6 +13,7 @@ License:      GPL+ or Artistic
 Group:         Development/Libraries
 URL:           http://search.cpan.org/dist/IO-AIO/
 Source0:       
http://search.cpan.org/CPAN/authors/id/M/ML/MLEHMANN/IO-AIO-%{upstream_version}.tar.gz
+Patch0:                IO-AIO-4.33-constants.patch
 BuildRoot:     %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
 # Module Build
 BuildRequires: coreutils
@@ -54,6 +55,10 @@ system supports.
 %prep
 %setup -q -n IO-AIO-%{upstream_version}
 
+# MAP_STACK requires kernel 2.6.27 onwards
+# MAP_32BIT not universally available either
+%patch0
+
 %build
 perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
 make %{?_smp_mflags}
@@ -99,6 +104,7 @@ rm -rf %{buildroot}
   - Added stability canary support
   - Updated linux super magic table to 4.3.3
 - Explicitly BR: perl-devel, needed for EXTERN.h
+- Add patch to support building on systems without MAP_STACK or MAP_32BIT
 
 * Thu Jun 18 2015 Fedora Release Engineering <rel-...@lists.fedoraproject.org> 
- 4.32-3
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
-- 
cgit v0.11.2


        
http://pkgs.fedoraproject.org/cgit/perl-IO-AIO.git/commit/?h=perl-IO-AIO-4.33-1.fc24&id=2db43b15c843ced3fb30384f17113226577f3168
--
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