From: Johannes Schindelin Date: Wed, 4 Sep 2024 14:16:54 +0000 (+0200) Subject: clar: avoid compile error with mingw-w64 X-Git-Tag: v2.47.0-rc0~32^2~11 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=42020d2dc01d552c9f034c691d25f726735ab3c5;p=thirdparty%2Fgit.git 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 Signed-off-by: Patrick Steinhardt Signed-off-by: Junio C Hamano --- diff --git a/t/unit-tests/clar/clar.c b/t/unit-tests/clar/clar.c index 3fc2c76815..e2ebe551d3 100644 --- a/t/unit-tests/clar/clar.c +++ b/t/unit-tests/clar/clar.c @@ -68,7 +68,7 @@ # define PRIxZ "Ix" # endif -# if defined(_MSC_VER) || defined(__MINGW32__) +# if defined(_MSC_VER) || (defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR)) typedef struct stat STAT_T; # else typedef struct _stat STAT_T;