Skip to content

Commit 3a7da47

Browse files
committed
Older musl doesn't have getrandom()
1 parent 45083af commit 3a7da47

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/unix/linux_like/linux/gnu/mod.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -967,6 +967,11 @@ extern {
967967
tz: *mut ::timezone) -> ::c_int;
968968
pub fn statx(dirfd: ::c_int, pathname: *const c_char, flags: ::c_int,
969969
mask: ::c_uint, statxbuf: *mut statx) -> ::c_int;
970+
pub fn getrandom(
971+
buf: *mut ::c_void,
972+
buflen: ::size_t,
973+
flags: ::c_uint,
974+
) -> ::ssize_t;
970975
}
971976

972977
#[link(name = "util")]

src/unix/linux_like/linux/mod.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2666,11 +2666,6 @@ 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 ::c_void,
2671-
buflen: ::size_t,
2672-
flags: ::c_uint,
2673-
) -> ::ssize_t;
26742669
}
26752670

26762671
cfg_if! {

0 commit comments

Comments
 (0)