diff --git a/contrib/pg_test_fsync/pg_test_fsync.c b/contrib/pg_test_fsync/pg_test_fsync.c index c842762..906bfe2 100644 --- a/contrib/pg_test_fsync/pg_test_fsync.c +++ b/contrib/pg_test_fsync/pg_test_fsync.c @@ -98,6 +98,11 @@ main(int argc, char *argv[]) { progname = get_progname(argv[0]); +#if defined(WIN32) && !defined(HAVE_GETTIMEOFDAY) + /* Figure out which syscall to use to capture timestamp information */ + init_win32_gettimeofday(); +#endif + handle_args(argc, argv); /* Prevent leaving behind the test file */ diff --git a/src/bin/pg_basebackup/pg_basebackup.c b/src/bin/pg_basebackup/pg_basebackup.c index fbf7106..84ad5ba 100644 --- a/src/bin/pg_basebackup/pg_basebackup.c +++ b/src/bin/pg_basebackup/pg_basebackup.c @@ -1955,6 +1955,11 @@ main(int argc, char **argv) progname = get_progname(argv[0]); set_pglocale_pgservice(argv[0], PG_TEXTDOMAIN("pg_basebackup")); +#if defined(WIN32) && !defined(HAVE_GETTIMEOFDAY) + /* Figure out which syscall to use to capture timestamp information */ + init_win32_gettimeofday(); +#endif + if (argc > 1) { if (strcmp(argv[1], "--help") == 0 || strcmp(argv[1], "-?") == 0) diff --git a/src/bin/pg_resetxlog/pg_resetxlog.c b/src/bin/pg_resetxlog/pg_resetxlog.c index a16089f..db34f0e 100644 --- a/src/bin/pg_resetxlog/pg_resetxlog.c +++ b/src/bin/pg_resetxlog/pg_resetxlog.c @@ -99,6 +99,11 @@ main(int argc, char *argv[]) progname = get_progname(argv[0]); +#if defined(WIN32) && !defined(HAVE_GETTIMEOFDAY) + /* Figure out which syscall to use to capture timestamp information */ + init_win32_gettimeofday(); +#endif + if (argc > 1) { if (strcmp(argv[1], "--help") == 0 || strcmp(argv[1], "-?") == 0)