diff options
author | Tom Lane | 2023-12-27 18:05:16 +0000 |
---|---|---|
committer | Tom Lane | 2023-12-27 18:05:19 +0000 |
commit | 3f1fd416316cbb66de61ac1ac34839f025b0b242 (patch) | |
tree | a20183b353cb4ebef8f593f3cd176bf67b94c51f | |
parent | 390408ec08d338f36798ec063f81c5098596f8da (diff) |
Fix another incorrect data type choice from commit dc2123400.
add_file_to_manifest declared its mtime argument as pg_time_t,
apparently on the principle that copy-and-paste from the backend
is fine. However, the callers are passing struct stat's st_mtime
field which is plain time_t, and add_file_to_manifest itself is
passing the value to gmtime(3) which expects plain time_t,
so the whole thing would not work at all on any platform where
those types are different. Fortunately we can just switch this
variable to time_t.
Per warnings from assorted buildfarm members.
-rw-r--r-- | src/bin/pg_combinebackup/write_manifest.c | 2 | ||||
-rw-r--r-- | src/bin/pg_combinebackup/write_manifest.h | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/src/bin/pg_combinebackup/write_manifest.c b/src/bin/pg_combinebackup/write_manifest.c index 5cf36c2b057..128cabf8a0b 100644 --- a/src/bin/pg_combinebackup/write_manifest.c +++ b/src/bin/pg_combinebackup/write_manifest.c @@ -72,7 +72,7 @@ create_manifest_writer(char *directory) */ void add_file_to_manifest(manifest_writer *mwriter, const char *manifest_path, - size_t size, pg_time_t mtime, + size_t size, time_t mtime, pg_checksum_type checksum_type, int checksum_length, uint8 *checksum_payload) diff --git a/src/bin/pg_combinebackup/write_manifest.h b/src/bin/pg_combinebackup/write_manifest.h index 8fd7fe02c87..2e518a20c0b 100644 --- a/src/bin/pg_combinebackup/write_manifest.h +++ b/src/bin/pg_combinebackup/write_manifest.h @@ -13,7 +13,6 @@ #define WRITE_MANIFEST_H #include "common/checksum_helper.h" -#include "pgtime.h" struct manifest_wal_range; @@ -23,7 +22,7 @@ typedef struct manifest_writer manifest_writer; extern manifest_writer *create_manifest_writer(char *directory); extern void add_file_to_manifest(manifest_writer *mwriter, const char *manifest_path, - size_t size, pg_time_t mtime, + size_t size, time_t mtime, pg_checksum_type checksum_type, int checksum_length, uint8 *checksum_payload); |