tytso / e2fsprogs

Ext2/3/4 file system utilities
http://ext4.wiki.kernel.org
373 stars 219 forks source link

ext2fs: Use 64-bit lseek when SIZEOF_OFF_T is 64bits #144

Closed iucoen closed 9 months ago

iucoen commented 1 year ago

musl-1.2.4 no longer defines lseek64, and since off_t is always 64-bits, autoconf decides to not pass in -D_FILE_OFFSET_BITS=64 when compiling, and this results in a compilation failure.

Instead of checking _FILE_OFFSET_BITS=64, let's just check if SIZEOF_OFF_T is SIZEOF_LONG_LONG. Also, SIZEOF_LONG is irrelevant.

floppym commented 1 year ago

I've done a more thorough cleanup of this code in #150. Feedback welcome.