diff --git a/src/input_file.c b/src/input_file.c
index 4c920efa2a5b4f794d657f19c648cd4da99a3df3..11df000c99bb693605e2d3694b529d8b99287d14 100644
--- a/src/input_file.c
+++ b/src/input_file.c
@@ -18,13 +18,13 @@
 
 #include <errno.h>
 #include <fcntl.h>
-#include <io.h>
 #include <string.h>
 
 // On Windows, define ssize_t and pread manually
 #ifdef _WIN32
 #define ssize_t __int64
 #define pread read
+#include <io.h>
 #else
 #include <unistd.h>
 #endif