Skip to content

Commit 42020d2

Browse files
dschogitster
authored andcommitted
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 <[email protected]> Signed-off-by: Patrick Steinhardt <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent aa57db2 commit 42020d2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

t/unit-tests/clar/clar.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
# define PRIxZ "Ix"
6969
# endif
7070

71-
# if defined(_MSC_VER) || defined(__MINGW32__)
71+
# if defined(_MSC_VER) || (defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR))
7272
typedef struct stat STAT_T;
7373
# else
7474
typedef struct _stat STAT_T;

0 commit comments

Comments
 (0)