Skip to content

Commit 55e1795

Browse files
authored
More stable workaround for MinGW fseek() workaround (#1759)
1 parent bd31a85 commit 55e1795

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/utils/fluid_sys.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1668,12 +1668,12 @@ int fluid_file_read(void *buf, fluid_long_long_t count, FILE *fd)
16681668

16691669
int fluid_file_seek(FILE *fd, fluid_long_long_t ofs, int whence)
16701670
{
1671-
#if (defined(__MINGW32__) || defined(__MINGW64__)) && defined(__GNUC__) && (__GNUC__ < 15)
1672-
// Some older versions of MinGW report incorrect values for _ftelli64(). This is problematic,
1671+
#if defined(__MINGW32__) && defined(__i386__)
1672+
// Some older versions of MinGW i686 report incorrect values for _ftelli64(). This is problematic,
16731673
// because _fseeki64() below would use these incorrect values when seeking with SEEK_CUR,
16741674
// resulting in incorrect file positions. So we need to work around this by doing the SEEK_CUR
16751675
// calculation ourselves.
1676-
// See https://sourceforge.net/p/mingw-w64/bugs/4897/ for more details.
1676+
// See https://sourceforge.net/p/mingw-w64/bugs/864/ for more details.
16771677
if(whence == SEEK_CUR)
16781678
{
16791679
whence = SEEK_SET;

0 commit comments

Comments
 (0)