Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions compat/mingw.c
Original file line number Diff line number Diff line change
Expand Up @@ -1509,6 +1509,9 @@ int mingw_utime (const char *file_name, const struct utimbuf *times)
size_t mingw_strftime(char *s, size_t max,
const char *format, const struct tm *tm)
{
#ifdef _UCRT
size_t ret = strftime(s, max, format, tm);
#else
/* a pointer to the original strftime in case we can't find the UCRT version */
static size_t (*fallback)(char *, size_t, const char *, const struct tm *) = strftime;
size_t ret;
Expand All @@ -1519,6 +1522,7 @@ size_t mingw_strftime(char *s, size_t max,
ret = strftime(s, max, format, tm);
else
ret = fallback(s, max, format, tm);
#endif

if (!ret && errno == EINVAL)
die("invalid strftime format: '%s'", format);
Expand Down
Loading