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>
maint
Johannes Schindelin 2024-09-04 16:16:54 +02:00 committed by Junio C Hamano
parent aa57db2822
commit 42020d2dc0
1 changed files with 1 additions and 1 deletions

View File

@ -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;