Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9a3b5d3

Browse files
committed
Fix build on zlib-less environments
Commit4d57e83 added support for getting I/O errors out of zlib,but it introduced a portability problem for systems without zlib.Repair by wrapping the zlib call inside #ifdef and restore the originalcode in the other branch.This serves to illustrate the inadequacy of the zlib abstraction inpg_backup_archiver: there is no way to call gzerror() in thatabstraction. This means that the several places that call GZREAD andGZWRITE are currently doing error reporting wrongly, but ENOTIME to getit fixed before next week's release set.Backpatch to 9.4, like the commit that introduced the problem.
1 parent972b6ec commit9a3b5d3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

‎src/bin/pg_dump/pg_backup_tar.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -556,12 +556,18 @@ _tarReadRaw(ArchiveHandle *AH, void *buf, size_t len, TAR_MEMBER *th, FILE *fh)
556556
res=GZREAD(&((char*)buf)[used],1,len,th->zFH);
557557
if (res!=len&& !GZEOF(th->zFH))
558558
{
559+
#ifdefHAVE_LIBZ
559560
interrnum;
560561
constchar*errmsg=gzerror(th->zFH,&errnum);
561562

562563
exit_horribly(modulename,
563564
"could not read from input file: %s\n",
564565
errnum==Z_ERRNO ?strerror(errno) :errmsg);
566+
#else
567+
exit_horribly(modulename,
568+
"could not read from input file: %s\n",
569+
strerror(errno));
570+
#endif
565571
}
566572
}
567573
else

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp