Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-12-11 01:35:15 +0300
committerJunio C Hamano <gitster@pobox.com>2021-12-11 01:35:15 +0300
commit25be7ec4bff10e8865d2a1e9ccd9e4fe125cbe62 (patch)
tree610dd6a7829573ff03b735a7f498a4d7ec61f44f /git-compat-util.h
parent4b1197ab5a74982fd09bda07d17325f1261975ee (diff)
parent9e12400da8d2b71e1fd7ccaa8f3c9cdbc52df554 (diff)
Merge branch 'cb/mingw-gmtime-r'
Build fix on Windows. * cb/mingw-gmtime-r: mingw: avoid fallback for {local,gm}time_r()
Diffstat (limited to 'git-compat-util.h')
-rw-r--r--git-compat-util.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/git-compat-util.h b/git-compat-util.h
index 98c4f2c81e..5fa54a7afe 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -148,7 +148,9 @@
/* Approximation of the length of the decimal representation of this type. */
#define decimal_length(x) ((int)(sizeof(x) * 2.56 + 0.5) + 1)
-#if defined(__sun__)
+#ifdef __MINGW64__
+#define _POSIX_C_SOURCE 1
+#elif defined(__sun__)
/*
* On Solaris, when _XOPEN_EXTENDED is set, its header file
* forces the programs to be XPG4v2, defeating any _XOPEN_SOURCE