diff --git a/compat/mingw-posix.h b/compat/mingw-posix.h index 9158f89d89d239..15c4f741338f37 100644 --- a/compat/mingw-posix.h +++ b/compat/mingw-posix.h @@ -411,9 +411,11 @@ extern int (*lstat)(const char *file_name, struct stat *buf); int mingw_utime(const char *file_name, const struct utimbuf *times); #define utime mingw_utime +#ifndef _UCRT size_t mingw_strftime(char *s, size_t max, const char *format, const struct tm *tm); #define strftime mingw_strftime +#endif pid_t mingw_spawnvpe(const char *cmd, const char **argv, char **env, const char *dir, diff --git a/compat/mingw.c b/compat/mingw.c index 5a9807e7a42b41..3b6732cea93a36 100644 --- a/compat/mingw.c +++ b/compat/mingw.c @@ -1505,6 +1505,7 @@ int mingw_utime (const char *file_name, const struct utimbuf *times) return rc; } +#ifndef _UCRT #undef strftime size_t mingw_strftime(char *s, size_t max, const char *format, const struct tm *tm) @@ -1524,6 +1525,7 @@ size_t mingw_strftime(char *s, size_t max, die("invalid strftime format: '%s'", format); return ret; } +#endif unsigned int sleep (unsigned int seconds) {