aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bin/pg_dump/pg_backup_tar.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/bin/pg_dump/pg_backup_tar.c b/src/bin/pg_dump/pg_backup_tar.c
index 3c41d40a938..2339d659bcb 100644
--- a/src/bin/pg_dump/pg_backup_tar.c
+++ b/src/bin/pg_dump/pg_backup_tar.c
@@ -556,12 +556,18 @@ _tarReadRaw(ArchiveHandle *AH, void *buf, size_t len, TAR_MEMBER *th, FILE *fh)
res = GZREAD(&((char *) buf)[used], 1, len, th->zFH);
if (res != len && !GZEOF(th->zFH))
{
+#ifdef HAVE_LIBZ
int errnum;
const char *errmsg = gzerror(th->zFH, &errnum);
exit_horribly(modulename,
"could not read from input file: %s\n",
errnum == Z_ERRNO ? strerror(errno) : errmsg);
+#else
+ exit_horribly(modulename,
+ "could not read from input file: %s\n",
+ strerror(errno));
+#endif
}
}
else