Only include sys/sysmacros.h on glibc, it is not portable
[project/make_ext4fs.git] / ext4_utils.h
index 2ad05a0..71f1cd6 100644 (file)
@@ -27,9 +27,12 @@ extern "C" {
 #define _FILE_OFFSET_BITS 64
 #define _LARGEFILE64_SOURCE 1
 #include <sys/types.h>
-#include <unistd.h>
 
-#include <sys/types.h>
+#ifdef __GLIBC__
+#include <sys/sysmacros.h>
+#endif
+
+#include <unistd.h>
 #include <errno.h>
 #include <stdarg.h>
 #include <stdio.h>