diff options
author | Miodrag Milanović <mmicko@gmail.com> | 2022-10-24 11:39:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-24 11:39:06 +0200 |
commit | c0e4d01aa7ee1ae349a4d7637336a50831b79a6d (patch) | |
tree | a529c6429bd2eb3076453ab13ec54f8b31d445ab | |
parent | 7fcc39abe3d0cf5a7b8572c9999f83d81d2e9452 (diff) | |
parent | 7dcc9c664e5d4f5116f9872ea3fab4a84b61fa40 (diff) | |
download | yosys-c0e4d01aa7ee1ae349a4d7637336a50831b79a6d.tar.gz yosys-c0e4d01aa7ee1ae349a4d7637336a50831b79a6d.tar.bz2 yosys-c0e4d01aa7ee1ae349a4d7637336a50831b79a6d.zip |
Merge pull request #3512 from lparkes/fstapi
Failure to read FST files on *BSD systems
-rw-r--r-- | libs/fst/fstapi.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libs/fst/fstapi.cc b/libs/fst/fstapi.cc index b79470db3..da0d959a0 100644 --- a/libs/fst/fstapi.cc +++ b/libs/fst/fstapi.cc @@ -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) { |