Closed flto closed 3 years ago
The byte offset value for lseek can easily exceed 4GB, cast as off_t to avoid overflow when converting sectors to bytes for lseek.
(and use lseek64/off64_t so this fixes 32-bit builds of qdl too)
Changed to use _FILE_OFFSET_BITS.
_FILE_OFFSET_BITS
4GB is correct for 64-bit builds, the cast from unsigned to off_t lets it work up to 4GB
The byte offset value for lseek can easily exceed 4GB, cast as off_t to avoid overflow when converting sectors to bytes for lseek.
(and use lseek64/off64_t so this fixes 32-bit builds of qdl too)