aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2023-10-17 14:27:39 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2023-10-17 16:28:56 +0200
commitd4b111b41cd2790e164f034ea5d205a0ba1c2c74 (patch)
treeae074bed7af4c350bc7a1dbb57ccef5588a3469c
parent55484e5ebec4b36ba984ff1561c5552aa7551de5 (diff)
main/e2fsprogs: fix build with musl 1.2.4+
ref: https://github.com/tytso/e2fsprogs/pull/144 ref: https://github.com/tytso/e2fsprogs/pull/150
-rw-r--r--main/e2fsprogs/APKBUILD7
-rw-r--r--main/e2fsprogs/lfs64.patch42
2 files changed, 47 insertions, 2 deletions
diff --git a/main/e2fsprogs/APKBUILD b/main/e2fsprogs/APKBUILD
index 6f984ff5b07..c0ea044bf6d 100644
--- a/main/e2fsprogs/APKBUILD
+++ b/main/e2fsprogs/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=e2fsprogs
pkgver=1.47.0
-pkgrel=4
+pkgrel=5
pkgdesc="Standard Ext2/3/4 filesystem utilities"
url="https://e2fsprogs.sourceforge.net/"
arch="all"
@@ -21,7 +21,9 @@ subpackages="
$pkgname-libs
$pkgname-extra
"
-source="$pkgname-$pkgver.tar.gz::https://github.com/tytso/e2fsprogs/archive/v$pkgver.tar.gz"
+source="$pkgname-$pkgver.tar.gz::https://github.com/tytso/e2fsprogs/archive/v$pkgver.tar.gz
+ lfs64.patch
+ "
case $CHOST in
riscv64*)
@@ -119,4 +121,5 @@ extra() {
sha512sums="
9cb895f7deed8ee513595b7c232db8345cb7e54e6cbb33e6eeab31c860c892cbc9d721756ac1429e6731e219e1c6aacc25075d517e979397c66bf764bc8bc9fa e2fsprogs-1.47.0.tar.gz
+9b97f91529844ad04a613d61ef762951859640d2677b4e37648ecc7cfbfc0b4831e8f3e49ad952fc16267d53e6e7c6cf588350a3e36edc2e22779f43d9ef17cf lfs64.patch
"
diff --git a/main/e2fsprogs/lfs64.patch b/main/e2fsprogs/lfs64.patch
new file mode 100644
index 00000000000..055c72f1a7a
--- /dev/null
+++ b/main/e2fsprogs/lfs64.patch
@@ -0,0 +1,42 @@
+From 92f8226c3cf7d84a4937766420a411e68771dfc2 Mon Sep 17 00:00:00 2001
+From: Mike Cui <cuicui@gmail.com>
+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
+