Skip to content

Commit 9ae6713

Browse files
committed
Fix walmethods.c build without libz
Per numerous buildfarm manuals
1 parent d97a59a commit 9ae6713

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/bin/pg_basebackup/walmethods.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,9 @@ tar_write(Walfile f, const void *buf, size_t count)
416416
return count;
417417
}
418418
#endif
419+
else
420+
/* Can't happen - compression enabled with no libz */
421+
return -1;
419422
}
420423

421424
static bool
@@ -879,8 +882,10 @@ CreateWalTarMethod(const char *tarbase, int compression, bool sync)
879882
tar_data->fd = -1;
880883
tar_data->compression = compression;
881884
tar_data->sync = sync;
885+
#ifdef HAVE_LIBZ
882886
if (compression)
883887
tar_data->zlibOut = (char *) pg_malloc(ZLIB_OUT_SIZE + 1);
888+
#endif
884889

885890
return method;
886891
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy