summaryrefslogtreecommitdiff
path: root/lib/blkid/devname.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2017-05-19 13:25:59 -0400
committerTheodore Ts'o <tytso@mit.edu>2017-05-19 13:25:59 -0400
commit3fb715b55426875902dfef3056b2cf7335953178 (patch)
tree899c0c8b05b28f9d3dce698c86e197916f192a97 /lib/blkid/devname.c
parente3d591eb1dfc6e03639171b120d48e8738deff04 (diff)
downloade2fsprogs-3fb715b55426875902dfef3056b2cf7335953178.tar.gz
include sys/sysmacros.h as needed
The minor/major/makedev macros are not entirely standard. glibc has had the definitions in sys/sysmacros.h since the start, and wants to move away from always defining them implicitly via sys/types.h (as this pollutes the namespace in violation of POSIX). Other C libraries have already dropped them. Since the configure script already checks for this header, use that to pull in the header in files that use these macros. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'lib/blkid/devname.c')
-rw-r--r--lib/blkid/devname.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/blkid/devname.c b/lib/blkid/devname.c
index 3e2efa9d..671e781f 100644
--- a/lib/blkid/devname.c
+++ b/lib/blkid/devname.c
@@ -36,6 +36,9 @@
#if HAVE_SYS_MKDEV_H
#include <sys/mkdev.h>
#endif
+#ifdef HAVE_SYS_SYSMACROS_H
+#include <sys/sysmacros.h>
+#endif
#include <time.h>
#include "blkidP.h"