Fix a pg_dump scenario for platforms where SEEK_CUR != 1.

POSIX allows such platforms.  Given the lack of complaints, we may not
currently test on such a platform.  This is new in v18 (commit
7d5c83b4e90c7156655f98b7312a30ae5eeb4d27), so no back-patch.
This commit is contained in:
Noah Misch 2025-06-03 11:18:52 -07:00
parent 73bdcfab35
commit 0e164eb9f4

View File

@ -2655,7 +2655,7 @@ WriteToc(ArchiveHandle *AH)
pg_fatal("unexpected TOC entry in WriteToc(): %d %s %s",
te->dumpId, te->desc, te->tag);
if (fseeko(AH->FH, te->defnLen, SEEK_CUR != 0))
if (fseeko(AH->FH, te->defnLen, SEEK_CUR) != 0)
pg_fatal("error during file seek: %m");
}
else if (te->defnDumper)