Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3f1fd41

Browse files
committed
Fix another incorrect data type choice from commitdc21234.
add_file_to_manifest declared its mtime argument as pg_time_t,apparently on the principle that copy-and-paste from the backendis fine. However, the callers are passing struct stat's st_mtimefield which is plain time_t, and add_file_to_manifest itself ispassing the value to gmtime(3) which expects plain time_t,so the whole thing would not work at all on any platform wherethose types are different. Fortunately we can just switch thisvariable to time_t.Per warnings from assorted buildfarm members.
1 parent390408e commit3f1fd41

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

‎src/bin/pg_combinebackup/write_manifest.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ create_manifest_writer(char *directory)
7272
*/
7373
void
7474
add_file_to_manifest(manifest_writer*mwriter,constchar*manifest_path,
75-
size_tsize,pg_time_tmtime,
75+
size_tsize,time_tmtime,
7676
pg_checksum_typechecksum_type,
7777
intchecksum_length,
7878
uint8*checksum_payload)

‎src/bin/pg_combinebackup/write_manifest.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
#defineWRITE_MANIFEST_H
1414

1515
#include"common/checksum_helper.h"
16-
#include"pgtime.h"
1716

1817
structmanifest_wal_range;
1918

@@ -23,7 +22,7 @@ typedef struct manifest_writer manifest_writer;
2322
externmanifest_writer*create_manifest_writer(char*directory);
2423
externvoidadd_file_to_manifest(manifest_writer*mwriter,
2524
constchar*manifest_path,
26-
size_tsize,pg_time_tmtime,
25+
size_tsize,time_tmtime,
2726
pg_checksum_typechecksum_type,
2827
intchecksum_length,
2928
uint8*checksum_payload);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp