Skip to content

Commit b456542

Browse files
committed
provide getentropy(2) instead of SYS_entropy
SYS_entropy is internal and may more easily change than getentropy(2).
1 parent e356b72 commit b456542

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/unix/bsd/openbsdlike/openbsd.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -218,9 +218,6 @@ pub const TMP_MAX : ::c_uint = 0x7fffffff;
218218

219219
pub const NI_MAXHOST: ::size_t = 256;
220220

221-
// syscall numbers
222-
pub const SYS_getentropy: ::c_int = 7;
223-
224221
extern {
225222
pub fn getnameinfo(sa: *const ::sockaddr,
226223
salen: ::socklen_t,
@@ -238,4 +235,5 @@ extern {
238235
newp: *mut ::c_void,
239236
newlen: ::size_t)
240237
-> ::c_int;
238+
pub fn getentropy(buf: *mut ::c_void, buflen: ::size_t) -> ::c_int;
241239
}

0 commit comments

Comments
 (0)