diff --git a/src/w32/compat/dirent.c b/src/w32/compat/dirent.c
index b8ec6152..de80f727 100644
--- a/src/w32/compat/dirent.c
+++ b/src/w32/compat/dirent.c
@@ -23,7 +23,7 @@ this program. If not, see . */
#include
#include "dirent.h"
-
+#ifndef __MINGW32__
DIR*
opendir(const char* pDirName)
{
@@ -193,3 +193,4 @@ seekdir(DIR* pDir, long nPosition)
return;
}
+#endif /* !__MINGW32__ */