From: Viktor Szakats Date: Fri, 14 Feb 2025 16:41:09 +0000 (+0100) Subject: build: set `HAVE_WRITABLE_ARGV` for Apple cross-builds X-Git-Tag: curl-8_13_0~474 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=876db1070bf3bee5e35ac0d2ebe612e313093262;p=thirdparty%2Fcurl.git build: set `HAVE_WRITABLE_ARGV` for Apple cross-builds Enable this feature for Apple cross-builds to match native macOS builds. Closes #16338 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 93009ef65d..d5f92ffffe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -546,6 +546,7 @@ if(_CURL_QUICK_DETECT) elseif(APPLE) set(HAVE_EVENTFD 0) set(HAVE_GETPASS_R 0) + set(HAVE_WRITABLE_ARGV 1) set(HAVE_SENDMMSG 0) endif() endif() diff --git a/configure.ac b/configure.ac index f1989db135..c975474ded 100644 --- a/configure.ac +++ b/configure.ac @@ -591,14 +591,17 @@ dnl ********************************************************************** CURL_CHECK_WIN32_LARGEFILE CURL_CHECK_WIN32_CRYPTO -CURL_DARWIN_CFLAGS - +curl_cv_apple='no' case $host in - *-apple-*) - CURL_SUPPORTS_BUILTIN_AVAILABLE - ;; + *-apple-*) curl_cv_apple='yes';; esac +CURL_DARWIN_CFLAGS + +if test "$curl_cv_apple" = 'yes'; then + CURL_SUPPORTS_BUILTIN_AVAILABLE +fi + curl_cv_cygwin='no' case $host_os in cygwin*|msys*) curl_cv_cygwin='yes';; @@ -1788,6 +1791,9 @@ int main(int argc, char **argv) ],[ curl_cv_writable_argv=cross ]) +if test "$curl_cv_writable_argv" = 'cross' -a "$curl_cv_apple" = 'yes'; then + curl_cv_writable_argv=yes +fi case $curl_cv_writable_argv in yes) AC_DEFINE(HAVE_WRITABLE_ARGV, 1, [Define this symbol if your OS supports changing the contents of argv])