From b440004b41724c625e6e1c2cc889245d4ebd7966 Mon Sep 17 00:00:00 2001 From: "Z. Liu" Date: Mon, 2 Jun 2025 16:08:35 +0800 Subject: [PATCH] net-ftp/lftp: fix musl build if using clang otherwise build failed with: > error: 'rpl_strtol' is not a member of 'std' Signed-off-by: Z. Liu Part-of: https://github.com/gentoo/gentoo/pull/42398 Closes: https://github.com/gentoo/gentoo/pull/42398 Signed-off-by: Sam James --- net-ftp/lftp/files/lftp-4.9.3-gnulib-stdlib.h.patch | 13 +++++++++++++ net-ftp/lftp/lftp-4.9.3.ebuild | 1 + 2 files changed, 14 insertions(+) create mode 100644 net-ftp/lftp/files/lftp-4.9.3-gnulib-stdlib.h.patch diff --git a/net-ftp/lftp/files/lftp-4.9.3-gnulib-stdlib.h.patch b/net-ftp/lftp/files/lftp-4.9.3-gnulib-stdlib.h.patch new file mode 100644 index 0000000000000..498ee402bee59 --- /dev/null +++ b/net-ftp/lftp/files/lftp-4.9.3-gnulib-stdlib.h.patch @@ -0,0 +1,13 @@ +diff --git a/lib/stdlib.in.h b/lib/stdlib.in.h +index ed00a43..f37ff84 100644 +--- a/lib/stdlib.in.h ++++ b/lib/stdlib.in.h +@@ -119,7 +119,7 @@ struct random_data + # include + #endif + +-#if ((@GNULIB_STRTOL@ && @REPLACE_STRTOL@) || (@GNULIB_STRTOLL@ && @REPLACE_STRTOLL@) || (@GNULIB_STRTOUL@ && @REPLACE_STRTOUL@) || (@GNULIB_STRTOULL@ && @REPLACE_STRTOULL@)) && defined __cplusplus && !defined GNULIB_NAMESPACE && defined __GNUG__ && !defined __clang__ ++#if ((@GNULIB_STRTOL@ && @REPLACE_STRTOL@) || (@GNULIB_STRTOLL@ && @REPLACE_STRTOLL@) || (@GNULIB_STRTOUL@ && @REPLACE_STRTOUL@) || (@GNULIB_STRTOULL@ && @REPLACE_STRTOULL@)) && defined __cplusplus && !defined GNULIB_NAMESPACE && defined __GNUG__ + /* When strtol, strtoll, strtoul, or strtoull is going to be defined as a macro + below, this may cause compilation errors later in the libstdc++ header files + (that are part of GCC), such as: diff --git a/net-ftp/lftp/lftp-4.9.3.ebuild b/net-ftp/lftp/lftp-4.9.3.ebuild index a752e9b046743..6f3384a127718 100644 --- a/net-ftp/lftp/lftp-4.9.3.ebuild +++ b/net-ftp/lftp/lftp-4.9.3.ebuild @@ -60,6 +60,7 @@ PATCHES=( "${FILESDIR}"/${PN}-4.9.1-libdir-readline.patch "${FILESDIR}"/${PN}-4.9.2-socks.patch "${FILESDIR}"/${PN}-4.9.3-gnulib.patch + "${FILESDIR}"/${PN}-4.9.3-gnulib-stdlib.h.patch ) # Gnulib false positive #900064