From a5677bc0390e2c0db0c0b8d4353b7423c555894b Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Sun, 20 Apr 2025 17:57:02 +0800 Subject: Get the custom cURL compiled on Fedora Asahi Remix getpwuid_r, which is declared in /usr/include/pwd.h, somehow is always missed by, at least the custom, libcurl compiling process. I tried defining __USE_POSIX so the getpwuid_r part in pwd.h is included, I also tried undefining HAVE_GETPWUID_R so the getpwuid_r part in curl/lib/netrc.c is skipped (respectively using -D and -U CPPFLAGS ENV setting in indra/cmake/CURL.cmake), with no success. So just force the getpwuid_r part in netrc.c to be skipped by substituting defined(HAVE_GETPWUID_R) with 0. --- indra/cmake/CURL.cmake | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/indra/cmake/CURL.cmake b/indra/cmake/CURL.cmake index 8407aa1f1d..00173e5418 100644 --- a/indra/cmake/CURL.cmake +++ b/indra/cmake/CURL.cmake @@ -38,6 +38,12 @@ elseif (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRA INPUT ${CMAKE_BINARY_DIR}/3p-curl-7.54.1-r1.tar.gz DESTINATION ${CMAKE_BINARY_DIR} ) + if (CMAKE_SYSTEM_PROCESSOR MATCHES aarch64 AND (${LINUX_DISTRO} MATCHES fedora)) + execute_process( + COMMAND sed -i netrc.c -e "s/defined(HAVE_GETPWUID_R)/0/g" netrc.c + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/3p-curl-7.54.1-r1/curl/lib + ) + endif () file( COPY ${CMAKE_BINARY_DIR}/3p-curl-7.54.1-r1/curl/include/curl/curl.h -- cgit v1.2.3