From c950024ba226793e1ec74d95f21fb26bdec33323 Mon Sep 17 00:00:00 2001 From: Jes Sorensen Date: Aug 15 2016 15:35:14 +0000 Subject: mdadm.h - include sys/sysmacros.h directly to build against F26+ glibc Signed-off-by: Jes Sorensen --- diff --git a/mdadm-3.4-mdadm.h-Fix-build-problem-against-newer-glibc.patch b/mdadm-3.4-mdadm.h-Fix-build-problem-against-newer-glibc.patch new file mode 100644 index 0000000..f5d7a97 --- /dev/null +++ b/mdadm-3.4-mdadm.h-Fix-build-problem-against-newer-glibc.patch @@ -0,0 +1,31 @@ +From 977d12d739deedd21ea3ca5a96d0ffd83bd5b4ea Mon Sep 17 00:00:00 2001 +From: Jes Sorensen +Date: Mon, 15 Aug 2016 11:30:39 -0400 +Subject: [PATCH] mdadm.h: Fix build problem against newer glibc + +Newer glibc requires direct include of sys/sysmacros.h in order to +access makedev(). + +Signed-off-by: Jes Sorensen +--- + mdadm.h | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/mdadm.h b/mdadm.h +index 1fd38a3..cfa5beb 100755 +--- a/mdadm.h ++++ b/mdadm.h +@@ -45,6 +45,10 @@ extern __off64_t lseek64 __P ((int __fd, __off64_t __offset, int __whence)); + #include + #include + #include ++#ifdef __GLIBC__ ++/* Newer glibc requires sys/sysmacros.h directly for makedev() */ ++#include ++#endif + #ifdef __dietlibc__ + #include + /* dietlibc has deprecated random and srandom!! */ +-- +2.7.4 + diff --git a/mdadm.spec b/mdadm.spec index cb6447b..81aa5a0 100644 --- a/mdadm.spec +++ b/mdadm.spec @@ -1,7 +1,7 @@ Summary: The mdadm program controls Linux md devices (software RAID arrays) Name: mdadm Version: 3.4 -Release: 2%{?dist} +Release: 3%{?dist} Source: http://www.kernel.org/pub/linux/utils/raid/mdadm/mdadm-%{version}.tar.xz Source1: mdmonitor.init Source2: raid-check @@ -21,6 +21,7 @@ Patch6: mdadm-3.4-imsm-properly-handle-values-of-sync_completed.patch Patch7: mdadm-3.4-The-sys_name-array-in-the-mdinfo-structure-is-20-byt.patch Patch8: mdadm-3.4-Grow_continue_command-remove-dead-code.patch Patch9: mdadm-3.4-check-reshape_active-more-times-before-Grow_continue.patch +Patch10: mdadm-3.4-mdadm.h-Fix-build-problem-against-newer-glibc.patch # Fedora customization patches Patch97: mdadm-3.3-udev.patch Patch98: mdadm-2.5.2-static.patch @@ -58,6 +59,7 @@ file can be used to help with some common tasks. %patch7 -p1 -b .sysname %patch8 -p1 -b .dead %patch9 -p1 -b .before +%patch10 -p1 -b .glibc # Fedora customization patches %patch97 -p1 -b .udev @@ -123,6 +125,9 @@ rm -rf %{buildroot} /etc/libreport/events.d/* %changelog +* Mon Aug 15 2016 Jes Sorensen - 3.4-3 +- Fix build against newer glibc (Fedora 26+) + * Fri Aug 12 2016 Jes Sorensen - 3.4-2 - Fix i686 build error - Fix problem where it was not possible to stop an IMSM array during reshape