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

Commit2a4bbed

Browse files
committed
Silence compiler warning about pointer type mismatch on some platforms.
timeval.t_sec is of type time_t, which is not always compatible with long.I'm not sure if this was just harmless warning or a real bug, but thisfixes it, anyway.
1 parent06623df commit2a4bbed

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

‎src/bin/pg_basebackup/receivelog.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -420,15 +420,20 @@ ReceiveXlogStream(PGconn *conn, XLogRecPtr startpos, uint32 timeline,
420420
if (standby_message_timeout)
421421
{
422422
TimestampTztargettime;
423+
longsecs;
424+
intusecs;
423425

424426
targettime=TimestampTzPlusMilliseconds(last_status,
425427
standby_message_timeout-1);
426428
localTimestampDifference(now,
427429
targettime,
428-
&timeout.tv_sec,
429-
(int*)&timeout.tv_usec);
430-
if (timeout.tv_sec <=0)
430+
&secs,
431+
&usecs);
432+
if (secs <=0)
431433
timeout.tv_sec=1;/* Always sleep at least 1 sec */
434+
else
435+
timeout.tv_sec=secs;
436+
timeout.tv_sec=usecs;
432437
timeoutptr=&timeout;
433438
}
434439
else

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp