git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d97a59a)
Fix walmethods.c build without libz
2016年10月23日 14:00:42 +0000 (16:00 +0200)
2016年10月23日 14:00:42 +0000 (16:00 +0200)
Per numerous buildfarm manuals


diff --git a/src/bin/pg_basebackup/walmethods.c b/src/bin/pg_basebackup/walmethods.c
index e0ec752bbdebbb045192b27a55dc4cbb704475df..d28913fa69f4a5b58f6ceb82bdcfcd5d79a042c2 100644 (file)
--- a/src/bin/pg_basebackup/walmethods.c
+++ b/src/bin/pg_basebackup/walmethods.c
@@ -416,6 +416,9 @@ tar_write(Walfile f, const void *buf, size_t count)
return count;
}
#endif
+ else
+ /* Can't happen - compression enabled with no libz */
+ return -1;
}
static bool
@@ -879,8 +882,10 @@ CreateWalTarMethod(const char *tarbase, int compression, bool sync)
tar_data->fd = -1;
tar_data->compression = compression;
tar_data->sync = sync;
+#ifdef HAVE_LIBZ
if (compression)
tar_data->zlibOut = (char *) pg_malloc(ZLIB_OUT_SIZE + 1);
+#endif
return method;
}
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /