From 4333c2f1de640379ec5ecbbc79219bef799b5bd0 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Wed, 15 May 2024 11:58:30 +0200 Subject: [PATCH] Add _NSGetArgv, _NSGetArgc and _NSGetProgname from crt_externs.h Available in the headers on all Apple platforms. --- libc-test/semver/apple.txt | 3 +++ src/unix/bsd/apple/mod.rs | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/libc-test/semver/apple.txt b/libc-test/semver/apple.txt index b4e91dd083463..dfa3ede1eb2de 100644 --- a/libc-test/semver/apple.txt +++ b/libc-test/semver/apple.txt @@ -1599,7 +1599,10 @@ _CS_PATH _IOFBF _IOLBF _IONBF +_NSGetArgc +_NSGetArgv _NSGetEnviron +_NSGetProgname _POSIX_VDISABLE _PTHREAD_COND_SIG_init _PTHREAD_MUTEX_SIG_init diff --git a/src/unix/bsd/apple/mod.rs b/src/unix/bsd/apple/mod.rs index ff3326475970d..a44b43fd16610 100644 --- a/src/unix/bsd/apple/mod.rs +++ b/src/unix/bsd/apple/mod.rs @@ -6266,7 +6266,11 @@ extern "C" { pub fn CCRandomGenerateBytes(bytes: *mut ::c_void, size: ::size_t) -> ::CCRNGStatus; pub fn getentropy(buf: *mut ::c_void, buflen: ::size_t) -> ::c_int; + // crt_externs.h + pub fn _NSGetArgv() -> *mut *mut *mut ::c_char; + pub fn _NSGetArgc() -> *mut ::c_int; pub fn _NSGetEnviron() -> *mut *mut *mut ::c_char; + pub fn _NSGetProgname() -> *mut *mut ::c_char; pub fn vm_allocate( target_task: vm_map_t,