commit:     cd8facfff575a005ef0177d2475948d0f08eaf81
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Sun Jun 25 22:50:48 2023 +0000
Commit:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Sun Jun 25 22:52:47 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cd8facff

sys-fs/e2fsprogs: Fix build with musl-1.2.4 (on mips o32)

* -D_GNU_SOURCE is not needed anymore (the line is from 2012)

* Append -D_FILE_OFFSET_BITS=64 to flags only on musl

* Keep --disable-largefile only on glibc ...

Bug: https://bugs.gentoo.org/908892
Signed-off-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>

 sys-fs/e2fsprogs/e2fsprogs-1.47.0-r1.ebuild | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/sys-fs/e2fsprogs/e2fsprogs-1.47.0-r1.ebuild 
b/sys-fs/e2fsprogs/e2fsprogs-1.47.0-r1.ebuild
index 580ff96d90bc..ed3a2e8d4f31 100644
--- a/sys-fs/e2fsprogs/e2fsprogs-1.47.0-r1.ebuild
+++ b/sys-fs/e2fsprogs/e2fsprogs-1.47.0-r1.ebuild
@@ -68,8 +68,8 @@ multilib_src_configure() {
        # Keep the package from doing silly things, bug #261411
        export VARTEXFONTS="${T}/fonts"
 
-       # Needs open64() prototypes and friends
-       append-cppflags -D_GNU_SOURCE
+       # needed for >=musl-1.2.4, bug 908892
+       use elibc_musl && append-cflags -D_FILE_OFFSET_BITS=64
 
        local myeconfargs=(
                --with-root-prefix="${EPREFIX}"
@@ -85,10 +85,12 @@ multilib_src_configure() {
                --disable-fsck
                --disable-uuidd
                --disable-lto
-               --disable-largefile # need to check effect on ABI
                --with-pthread
        )
 
+       # need to check effect on ABI (???)
+       use elibc_glibc && myeconfargs+=( --disable-largefile )
+
        # We use blkid/uuid from util-linux now
        if use kernel_linux ; then
                export ac_cv_lib_{uuid_uuid_generate,blkid_blkid_get_cache}=yes

Reply via email to