Skip to content

Commit d78de29

Browse files
committed
adding getentropy for apple devices.
1 parent 1ec4e59 commit d78de29

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

libc-test/build.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,7 @@ fn test_apple(target: &str) {
268268
"sys/proc_info.h",
269269
"sys/ptrace.h",
270270
"sys/quota.h",
271+
"sys/random.h",
271272
"sys/resource.h",
272273
"sys/sem.h",
273274
"sys/shm.h",

libc-test/semver/apple.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1915,6 +1915,7 @@ getattrlistbulk
19151915
getdate
19161916
getdomainname
19171917
getdtablesize
1918+
getentropy
19181919
getfsstat
19191920
getgrent
19201921
getgrgid

src/unix/bsd/apple/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6260,6 +6260,7 @@ extern "C" {
62606260
pub fn sethostid(hostid: ::c_long);
62616261

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

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

0 commit comments

Comments
 (0)