]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
ext2fs: Use 64bit lseek when _FILE_OFFSET_BITS is 64
authorKhem Raj <raj.khem@gmail.com>
Thu, 15 Dec 2022 04:56:44 +0000 (20:56 -0800)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 1 Feb 2023 16:21:40 +0000 (11:21 -0500)
Use lseek() with 64bit off_t when _FILE_OFFSET_BITS is 64
this fixes build with musl where there is no _llseek but lseek
is using off_t which is 64bit on musl

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
lib/ext2fs/llseek.c

index 922a0d563aa9bf44edf094c7c0aaa0f92240aacb..45f21d09d6e09295b15d7056b81c1427b636b3b8 100644 (file)
@@ -51,7 +51,7 @@ extern long long llseek (int fd, long long offset, int origin);
 
 #else  /* ! HAVE_LLSEEK */
 
-#if SIZEOF_LONG == SIZEOF_LONG_LONG
+#if SIZEOF_LONG == SIZEOF_LONG_LONG || _FILE_OFFSET_BITS+0 == 64
 
 #define my_llseek lseek
 
@@ -69,7 +69,7 @@ static int _llseek (unsigned int, unsigned long,
 
 static _syscall5(int,_llseek,unsigned int,fd,unsigned long,offset_high,
                 unsigned long, offset_low,ext2_loff_t *,result,
-                unsigned int, origin)
+                unsigned int, origin);
 #endif
 
 static ext2_loff_t my_llseek (int fd, ext2_loff_t offset, int origin)