mdadm.h - include sys/sysmacros.h directly to build against F26+ glibc

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
This commit is contained in:
Jes Sorensen 2016-08-15 11:35:14 -04:00
parent c64955485e
commit c950024ba2
2 changed files with 37 additions and 1 deletions

View File

@ -0,0 +1,31 @@
From 977d12d739deedd21ea3ca5a96d0ffd83bd5b4ea Mon Sep 17 00:00:00 2001
From: Jes Sorensen <Jes.Sorensen@redhat.com>
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 <Jes.Sorensen@redhat.com>
---
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 <errno.h>
#include <string.h>
#include <syslog.h>
+#ifdef __GLIBC__
+/* Newer glibc requires sys/sysmacros.h directly for makedev() */
+#include <sys/sysmacros.h>
+#endif
#ifdef __dietlibc__
#include <strings.h>
/* dietlibc has deprecated random and srandom!! */
--
2.7.4

View File

@ -1,7 +1,7 @@
Summary: The mdadm program controls Linux md devices (software RAID arrays) Summary: The mdadm program controls Linux md devices (software RAID arrays)
Name: mdadm Name: mdadm
Version: 3.4 Version: 3.4
Release: 2%{?dist} Release: 3%{?dist}
Source: http://www.kernel.org/pub/linux/utils/raid/mdadm/mdadm-%{version}.tar.xz Source: http://www.kernel.org/pub/linux/utils/raid/mdadm/mdadm-%{version}.tar.xz
Source1: mdmonitor.init Source1: mdmonitor.init
Source2: raid-check 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 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 Patch8: mdadm-3.4-Grow_continue_command-remove-dead-code.patch
Patch9: mdadm-3.4-check-reshape_active-more-times-before-Grow_continue.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 # Fedora customization patches
Patch97: mdadm-3.3-udev.patch Patch97: mdadm-3.3-udev.patch
Patch98: mdadm-2.5.2-static.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 %patch7 -p1 -b .sysname
%patch8 -p1 -b .dead %patch8 -p1 -b .dead
%patch9 -p1 -b .before %patch9 -p1 -b .before
%patch10 -p1 -b .glibc
# Fedora customization patches # Fedora customization patches
%patch97 -p1 -b .udev %patch97 -p1 -b .udev
@ -123,6 +125,9 @@ rm -rf %{buildroot}
/etc/libreport/events.d/* /etc/libreport/events.d/*
%changelog %changelog
* Mon Aug 15 2016 Jes Sorensen <Jes.Sorensen@redhat.com> - 3.4-3
- Fix build against newer glibc (Fedora 26+)
* Fri Aug 12 2016 Jes Sorensen <Jes.Sorensen@redhat.com> - 3.4-2 * Fri Aug 12 2016 Jes Sorensen <Jes.Sorensen@redhat.com> - 3.4-2
- Fix i686 build error - Fix i686 build error
- Fix problem where it was not possible to stop an IMSM array during reshape - Fix problem where it was not possible to stop an IMSM array during reshape