Commit 9ae6713c authored by Magnus Hagander's avatar Magnus Hagander

Fix walmethods.c build without libz

Per numerous buildfarm manuals
parent d97a59a4
...@@ -416,6 +416,9 @@ tar_write(Walfile f, const void *buf, size_t count) ...@@ -416,6 +416,9 @@ tar_write(Walfile f, const void *buf, size_t count)
return count; return count;
} }
#endif #endif
else
/* Can't happen - compression enabled with no libz */
return -1;
} }
static bool static bool
...@@ -879,8 +882,10 @@ CreateWalTarMethod(const char *tarbase, int compression, bool sync) ...@@ -879,8 +882,10 @@ CreateWalTarMethod(const char *tarbase, int compression, bool sync)
tar_data->fd = -1; tar_data->fd = -1;
tar_data->compression = compression; tar_data->compression = compression;
tar_data->sync = sync; tar_data->sync = sync;
#ifdef HAVE_LIBZ
if (compression) if (compression)
tar_data->zlibOut = (char *) pg_malloc(ZLIB_OUT_SIZE + 1); tar_data->zlibOut = (char *) pg_malloc(ZLIB_OUT_SIZE + 1);
#endif
return method; return method;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment