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);
|
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);
|
||||||
|
@ -4272,6 +4273,7 @@ int fstReaderInit(struct fstReaderContext *xc)
|
||||||
#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) {
|
||||||
for (offpnt = 0; offpnt < uclen; offpnt += FST_GZIO_LEN) {
|
for (offpnt = 0; offpnt < uclen; offpnt += FST_GZIO_LEN) {
|
||||||
|
|
Loading…
Reference in New Issue