Many files:
  Add #ifdef's for HAVE_SYS_STAT_H and HAVE_SYS_TYPES_H

diff --git a/lib/ext2fs/openfs.c b/lib/ext2fs/openfs.c
index 791ebe1..6b27397 100644
--- a/lib/ext2fs/openfs.c
+++ b/lib/ext2fs/openfs.c
@@ -22,8 +22,12 @@
 #if HAVE_ERRNO_H
 #include <errno.h>
 #endif
+#if HAVE_SYS_STAT_H
 #include <sys/stat.h>
+#endif
+#if HAVE_SYS_TYPES_H
 #include <sys/types.h>
+#endif
 
 #include <linux/ext2_fs.h>