diff --git a/src/modules/files/efuns.c b/src/modules/files/efuns.c
index f7e29317d2a112993a835d889d881a2bc2c5fd01..3b243d7e5cd71ba81a118047305284082061ff1a 100644
--- a/src/modules/files/efuns.c
+++ b/src/modules/files/efuns.c
@@ -101,12 +101,12 @@ void f_file_stat(INT32 args)
 #ifdef HAVE_SYS_STATVFS_H
 #include <sys/statvfs.h>
 #endif /* HAVE_SYS_STATVFS_H */
-#ifdef HAVE_SYS_STATFS_H
-#include <sys/statfs.h>
-#endif
 #ifdef HAVE_SYS_VFS_H
 #include <sys/vfs.h>
 #endif /* HAVE_SYS_VFS_H */
+#ifdef HAVE_SYS_STATFS_H
+#include <sys/statfs.h>
+#endif
 #ifdef HAVE_SYS_MOUNT_H
 #include <sys/mount.h>
 #endif /* HAVE_SYS_MOUNT_H */