mirror of https://github.com/YosysHQ/yosys.git
Merge pull request #3512 from lparkes/fstapi
Failure to read FST files on *BSD systems
This commit is contained in:
commit
c0e4d01aa7
|
@ -3607,6 +3607,7 @@ static int fstReaderRecreateHierFile(struct fstReaderContext *xc)
|
|||
fflush(xc->f);
|
||||
#endif
|
||||
zfd = dup(fileno(xc->f));
|
||||
lseek(zfd, ftell(xc->f), SEEK_SET);
|
||||
zhandle = gzdopen(zfd, "rb");
|
||||
if (!zhandle) {
|
||||
close(zfd);
|
||||
|
@ -4272,6 +4273,7 @@ int fstReaderInit(struct fstReaderContext *xc)
|
|||
#endif
|
||||
|
||||
zfd = dup(fileno(xc->f));
|
||||
lseek(zfd, ftell(xc->f), SEEK_SET);
|
||||
zhandle = gzdopen(zfd, "rb");
|
||||
if (zhandle) {
|
||||
for (offpnt = 0; offpnt < uclen; offpnt += FST_GZIO_LEN) {
|
||||
|
|
Loading…
Reference in New Issue