diff --git a/src/backend/backup/basebackup_incremental.c b/src/backend/backup/basebackup_incremental.c
index 42bbe564e2..aa98e1872f 100644
--- a/src/backend/backup/basebackup_incremental.c
+++ b/src/backend/backup/basebackup_incremental.c
@@ -441,7 +441,7 @@ PrepareForIncrementalBackup(IncrementalBackupInfo *ib,
 
 		/* Wait for up to 10 seconds. */
 		summarized_lsn = WaitForWalSummarization(backup_state->startpoint,
-												 10000, &pending_lsn);
+												 timeout_in_ms, &pending_lsn);
 
 		/* If WAL summarization has progressed sufficiently, stop waiting. */
 		if (summarized_lsn >= backup_state->startpoint)
diff --git a/src/bin/pg_combinebackup/reconstruct.c b/src/bin/pg_combinebackup/reconstruct.c
index 6decdd8934..21cba5b33d 100644
--- a/src/bin/pg_combinebackup/reconstruct.c
+++ b/src/bin/pg_combinebackup/reconstruct.c
@@ -504,7 +504,7 @@ make_rfile(char *filename, bool missing_ok)
 static void
 read_bytes(rfile *rf, void *buffer, unsigned length)
 {
-	unsigned	rb = read(rf->fd, buffer, length);
+	int		rb = read(rf->fd, buffer, length);
 
 	if (rb != length)
 	{
@@ -614,7 +614,7 @@ write_reconstructed_file(char *input_filename,
 	{
 		uint8		buffer[BLCKSZ];
 		rfile	   *s = sourcemap[i];
-		unsigned	wb;
+		int			wb;
 
 		/* Update accounting information. */
 		if (s == NULL)
@@ -641,7 +641,7 @@ write_reconstructed_file(char *input_filename,
 		}
 		else
 		{
-			unsigned	rb;
+			int		rb;
 
 			/* Read the block from the correct source, except if dry-run. */
 			rb = pg_pread(s->fd, buffer, BLCKSZ, offsetmap[i]);
