You've already forked pg_probackup
mirror of
https://github.com/postgrespro/pg_probackup.git
synced 2025-09-16 09:26:30 +02:00
Replaced the function strftime with pg_strftime for logs in Windows
This commit is contained in:
@@ -182,6 +182,7 @@ sub build_pgprobackup
|
||||
$probackup->AddFile("$pgsrc/src/bin/pg_rewind/datapagemap.c");
|
||||
|
||||
$probackup->AddFile("$pgsrc/src/interfaces/libpq/pthread-win32.c");
|
||||
$probackup->AddFile("$pgsrc/src/timezone/strftime.c");
|
||||
|
||||
$probackup->AddIncludeDir("$pgsrc/src/bin/pg_basebackup");
|
||||
$probackup->AddIncludeDir("$pgsrc/src/bin/pg_rewind");
|
||||
|
@@ -470,7 +470,11 @@ logfile_getname(const char *format, time_t timestamp)
|
||||
len = strlen(filename);
|
||||
|
||||
/* Treat log_filename as a strftime pattern */
|
||||
#ifdef WIN32
|
||||
if (pg_strftime(filename + len, MAXPGPATH - len, format, tm) <= 0)
|
||||
#else
|
||||
if (strftime(filename + len, MAXPGPATH - len, format, tm) <= 0)
|
||||
#endif
|
||||
elog_stderr(ERROR, "strftime(%s) failed: %s", format, strerror(errno));
|
||||
|
||||
return filename;
|
||||
|
Reference in New Issue
Block a user