clar: avoid compile error with mingw-w64
When using mingw-w64 to compile the code, and using `_stat()`, it is necessary to use `struct _stat`, too, and not `struct stat` (as the latter is incompatible with the "dashed" version because it is limited to 32-bit time types for backwards compatibility). Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Johannes Schindelin committed
Sep 4, 2024 at 16:16 UTC
42020d2dc01d552c9f034c691d25f726735ab3c5
1 file changed
+1
-1
t/unit-tests/clar/clar.c
+1
-1
@@ -68,7 +68,7 @@
68
# define PRIxZ "Ix"
69
# endif
70
71
-# if defined(_MSC_VER) || defined(__MINGW32__)
71
+# if defined(_MSC_VER) || (defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR))
72
typedef struct stat STAT_T;
73
# else
74
typedef struct _stat STAT_T;