mdadm/mdadm-3.4-mdadm.h-Fix-build-problem-against-newer-glibc.patch
Jes Sorensen c950024ba2 mdadm.h - include sys/sysmacros.h directly to build against F26+ glibc
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
2016-08-15 11:35:14 -04:00

32 lines
889 B
Diff

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