Skip to content

Commit

Permalink
adding getentropy for apple devices.
Browse files Browse the repository at this point in the history
  • Loading branch information
devnexen committed Nov 13, 2023
1 parent 1ec4e59 commit 8f218fa
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions libc-test/build.rs
Expand Up @@ -295,6 +295,7 @@ fn test_apple(target: &str) {
"utmpx.h",
"wchar.h",
"xlocale.h",
"sys/random.h",
[x86_64]: "crt_externs.h",
}

Expand Down
1 change: 1 addition & 0 deletions libc-test/semver/apple.txt
Expand Up @@ -1915,6 +1915,7 @@ getattrlistbulk
getdate
getdomainname
getdtablesize
getentropy
getfsstat
getgrent
getgrgid
Expand Down
1 change: 1 addition & 0 deletions src/unix/bsd/apple/mod.rs
Expand Up @@ -6260,6 +6260,7 @@ extern "C" {
pub fn sethostid(hostid: ::c_long);

pub fn CCRandomGenerateBytes(bytes: *mut ::c_void, size: ::size_t) -> ::CCRNGStatus;
pub fn getentropy(buf: *mut ::c_void, buflen: ::size_t) -> ::c_int;

pub fn _NSGetExecutablePath(buf: *mut ::c_char, bufsize: *mut u32) -> ::c_int;
pub fn _NSGetEnviron() -> *mut *mut *mut ::c_char;
Expand Down

0 comments on commit 8f218fa

Please sign in to comment.