diff --git a/src/stratagus/util.cpp b/src/stratagus/util.cpp
index 0a72afd7c..11d238844 100644
--- a/src/stratagus/util.cpp
+++ b/src/stratagus/util.cpp
@@ -224,7 +224,7 @@ void _hash_stat(void* tab, int size, struct hash_st* st)
 **  an 'argument required' error.
 */
 
-#ifdef _MSC_VER
+#if defined(_MSC_VER) || defined(__MINGW32__)
 
 #include <io.h>
 #include <string.h>