Skip to content

Commit 8bc8981

Browse files
committed
Add getrandom() bindings on linux and android
Closes #659
1 parent e0ff1e6 commit 8bc8981

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

src/unix/linux_like/android/mod.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2195,6 +2195,11 @@ extern {
21952195
pub fn inotify_add_watch(fd: ::c_int,
21962196
path: *const ::c_char,
21972197
mask: u32) -> ::c_int;
2198+
pub fn getrandom(
2199+
buf: *mut u8,
2200+
buflen: ::size_t,
2201+
flags: ::c_uint,
2202+
) -> ::ssize_t;
21982203
}
21992204

22002205
cfg_if! {

src/unix/linux_like/linux/mod.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2666,6 +2666,11 @@ extern {
26662666
pub fn inotify_add_watch(fd: ::c_int,
26672667
path: *const ::c_char,
26682668
mask: u32) -> ::c_int;
2669+
pub fn getrandom(
2670+
buf: *mut u8,
2671+
buflen: ::size_t,
2672+
flags: ::c_uint,
2673+
) -> ::ssize_t;
26692674
}
26702675

26712676
cfg_if! {

0 commit comments

Comments
 (0)