g13: Include sys/sysmacros.h if available.
authorNIIBE Yutaka <gniibe@fsij.org>
Tue, 11 Apr 2017 10:59:07 +0000 (19:59 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Tue, 11 Apr 2017 10:59:07 +0000 (19:59 +0900)
* configure.ac: Add test for sys/sysmacros.h.
* g13/sh-dmcrypt.c: Include sys/sysmacros.h.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
configure.ac
g13/sh-dmcrypt.c

index f58708c..4c90d6c 100644 (file)
@@ -1278,7 +1278,7 @@ AC_HEADER_STDC
 AC_CHECK_HEADERS([string.h unistd.h langinfo.h termio.h locale.h getopt.h \
                   pty.h utmp.h pwd.h inttypes.h signal.h sys/select.h     \
                   stdint.h signal.h util.h libutil.h termios.h \
-                  ucred.h])
+                  ucred.h sys/sysmacros.h])
 
 AC_HEADER_TIME
 
index f7ec797..c5489c9 100644 (file)
@@ -25,6 +25,9 @@
 #include <errno.h>
 #include <assert.h>
 #include <sys/types.h>
+#ifdef HAVE_SYS_SYSMACROS_H
+# include <sys/sysmacros.h>
+#endif
 #ifdef HAVE_STAT
 # include <sys/stat.h>
 #endif