# --- T2-COPYRIGHT-NOTE-BEGIN --- # T2 SDE: package/*/e2fsprogs/lfs64.patch.musl # Copyright (C) 2024 The T2 SDE Project # # This Copyright note is generated by scripts/Create-CopyPatch, # more information can be found in the files COPYING and README. # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms # of the GNU General Public License version 2 as used by the T2 SDE. # --- T2-COPYRIGHT-NOTE-END --- From 92f8226c3cf7d84a4937766420a411e68771dfc2 Mon Sep 17 00:00:00 2001 From: Mike Cui Date: Sun, 7 May 2023 02:46:47 -0700 Subject: [PATCH] ext2fs: Use 64-bit lseek when SIZEOF_OFF_T is 64bits 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. --- lib/blkid/llseek.c | 2 +- lib/ext2fs/llseek.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/blkid/llseek.c b/lib/blkid/llseek.c index 59298646f..f24e40b1f 100644 --- a/lib/blkid/llseek.c +++ b/lib/blkid/llseek.c @@ -50,7 +50,7 @@ extern long long llseek(int fd, long long offset, int origin); #else /* ! HAVE_LLSEEK */ -#if SIZEOF_LONG == SIZEOF_LONG_LONG +#if SIZEOF_OFF_T == SIZEOF_LONG_LONG #define llseek lseek diff --git a/lib/ext2fs/llseek.c b/lib/ext2fs/llseek.c index 45f21d09d..713312aa8 100644 --- a/lib/ext2fs/llseek.c +++ b/lib/ext2fs/llseek.c @@ -51,7 +51,7 @@ extern long long llseek (int fd, long long offset, int origin); #else /* ! HAVE_LLSEEK */ -#if SIZEOF_LONG == SIZEOF_LONG_LONG || _FILE_OFFSET_BITS+0 == 64 +#if SIZEOF_OFF_T == SIZEOF_LONG_LONG #define my_llseek lseek