summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-12-01 14:33:03 (GMT)
committerKitware Robot <kwrobot@kitware.com>2021-12-01 14:33:22 (GMT)
commitbd7f276c52eed76ae9e163c75bf7293469c4523d (patch)
tree8f7eb82f0a98e3e50b4405e873a25931daa7d85b
parent5109a22d61ebe42c2e36a2fbd35114b22334fa76 (diff)
parent992e6d7c5dd3a8cdf330bea9cc988d8974f5e3d5 (diff)
downloadCMake-bd7f276c52eed76ae9e163c75bf7293469c4523d.zip
CMake-bd7f276c52eed76ae9e163c75bf7293469c4523d.tar.gz
CMake-bd7f276c52eed76ae9e163c75bf7293469c4523d.tar.bz2
Merge topic 'mingw-strftime-crash' into release-3.22
992e6d7c5d mingw: fix calling convention for strftime() Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6762
-rw-r--r--Source/cmTimestamp.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmTimestamp.cxx b/Source/cmTimestamp.cxx
index c8f5a4b..3826577 100644
--- a/Source/cmTimestamp.cxx
+++ b/Source/cmTimestamp.cxx
@@ -197,7 +197,7 @@ std::string cmTimestamp::AddTimestampComponent(char flag,
#ifdef __MINGW32__
/* See a bug in MinGW: https://sourceforge.net/p/mingw-w64/bugs/793/. A work
* around is to try to use strftime() from ucrtbase.dll. */
- using T = size_t(WINAPI*)(char*, size_t, const char*, const struct tm*);
+ using T = size_t(__cdecl*)(char*, size_t, const char*, const struct tm*);
auto loadUcrtStrftime = []() -> T {
auto handle =
LoadLibraryExA("ucrtbase.dll", nullptr, LOAD_LIBRARY_SEARCH_SYSTEM32);