summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/pg_basebackup/bbstreamer_gzip.c2
-rw-r--r--src/bin/pg_basebackup/walmethods.c5
2 files changed, 3 insertions, 4 deletions
diff --git a/src/bin/pg_basebackup/bbstreamer_gzip.c b/src/bin/pg_basebackup/bbstreamer_gzip.c
index 3bdbfa0bc43..fb25fef1500 100644
--- a/src/bin/pg_basebackup/bbstreamer_gzip.c
+++ b/src/bin/pg_basebackup/bbstreamer_gzip.c
@@ -269,7 +269,7 @@ bbstreamer_gzip_decompressor_content(bbstreamer *streamer,
mystreamer = (bbstreamer_gzip_decompressor *) streamer;
zs = &mystreamer->zstream;
- zs->next_in = (uint8 *) data;
+ zs->next_in = (const uint8 *) data;
zs->avail_in = len;
/* Process the current chunk */
diff --git a/src/bin/pg_basebackup/walmethods.c b/src/bin/pg_basebackup/walmethods.c
index d780c4055cd..2de11ce9b1c 100644
--- a/src/bin/pg_basebackup/walmethods.c
+++ b/src/bin/pg_basebackup/walmethods.c
@@ -705,7 +705,7 @@ typedef struct TarMethodData
#ifdef HAVE_LIBZ
static bool
-tar_write_compressed_data(TarMethodData *tar_data, void *buf, size_t count,
+tar_write_compressed_data(TarMethodData *tar_data, const void *buf, size_t count,
bool flush)
{
tar_data->zp->next_in = buf;
@@ -782,8 +782,7 @@ tar_write(Walfile *f, const void *buf, size_t count)
#ifdef HAVE_LIBZ
else if (f->wwmethod->compression_algorithm == PG_COMPRESSION_GZIP)
{
- if (!tar_write_compressed_data(tar_data, unconstify(void *, buf),
- count, false))
+ if (!tar_write_compressed_data(tar_data, buf, count, false))
return -1;
f->currpos += count;
return count;