3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-07 01:54:10 +00:00

And another place we need to lseek() after dup().

This commit is contained in:
Lloyd Parkes 2022-10-16 12:50:49 +13:00
parent 635aa2a3fc
commit 7dcc9c664e

View file

@ -3607,6 +3607,7 @@ static int fstReaderRecreateHierFile(struct fstReaderContext *xc)
fflush(xc->f); fflush(xc->f);
#endif #endif
zfd = dup(fileno(xc->f)); zfd = dup(fileno(xc->f));
lseek(zfd, ftell(xc->f), SEEK_SET);
zhandle = gzdopen(zfd, "rb"); zhandle = gzdopen(zfd, "rb");
if (!zhandle) { if (!zhandle) {
close(zfd); close(zfd);