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(+) (limited to 'indra/cmake/CURL.cmake') 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 From f28dc513890043e7bc0968f1292f55ec7e8cd20a Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Fri, 25 Apr 2025 21:29:15 +0800 Subject: Unset CFLAGS after building libcurl so that the C90 standard setting is not used when compiling other dependencies such as OpenJPEG. --- indra/cmake/CURL.cmake | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/cmake/CURL.cmake') diff --git a/indra/cmake/CURL.cmake b/indra/cmake/CURL.cmake index 00173e5418..7f50975ea8 100644 --- a/indra/cmake/CURL.cmake +++ b/indra/cmake/CURL.cmake @@ -82,6 +82,7 @@ elseif (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRA WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/3p-curl-7.54.1-r1/curl RESULT_VARIABLE curl_installed ) + unset(ENV{CFLAGS}) file( COPY ${CMAKE_BINARY_DIR}/3p-curl-7.54.1-r1/curl/lib/.libs/libcurl.a DESTINATION ${LIBS_PREBUILT_DIR}/lib/release -- cgit v1.2.3