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 d78de29
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 @@ -268,6 +268,7 @@ fn test_apple(target: &str) {
"sys/proc_info.h",
"sys/ptrace.h",
"sys/quota.h",
"sys/random.h",
"sys/resource.h",
"sys/sem.h",
"sys/shm.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 d78de29

Please sign in to comment.