mingw: use `struct stat`
diff --git a/tests/clar.c b/tests/clar.c
index 27d35e1..459ece0 100644
--- a/tests/clar.c
+++ b/tests/clar.c
@@ -67,7 +67,7 @@
# define PRIxZ "Ix"
# endif
-# ifdef _MSC_VER
+# if defined(_MSC_VER) || defined(__MINGW32__)
typedef struct stat STAT_T;
# else
typedef struct _stat STAT_T;