]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
mdadm.h: Fix build problem against newer glibc
authorJes Sorensen <Jes.Sorensen@redhat.com>
Mon, 15 Aug 2016 15:30:39 +0000 (11:30 -0400)
committerJes Sorensen <Jes.Sorensen@redhat.com>
Mon, 15 Aug 2016 15:30:39 +0000 (11:30 -0400)
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

diff --git a/mdadm.h b/mdadm.h
index 1fd38a37a982b2f8062a7ec175f7faf82e2b1611..cfa5bebe8cffbe576530640aa75949fc8ffae99c 100755 (executable)
--- 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!! */