Skip to content

Commit f9ee729

Browse files
committed
Auto merge of #2217 - devnexen:fbsd_timingsafe_api, r=JohnTitor
freebsd introducing timingsafe api (from 12)
2 parents f86dbf2 + 88ec609 commit f9ee729

File tree

2 files changed

+4
-0
lines changed
  • src/unix/bsd/freebsdlike/freebsd

2 files changed

+4
-0
lines changed

src/unix/bsd/freebsdlike/freebsd/freebsd12/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,8 @@ extern "C" {
229229
pub fn getrandom(buf: *mut ::c_void, buflen: ::size_t, flags: ::c_uint) -> ::ssize_t;
230230
pub fn elf_aux_info(aux: ::c_int, buf: *mut ::c_void, buflen: ::c_int) -> ::c_int;
231231
pub fn setproctitle_fast(fmt: *const ::c_char, ...);
232+
pub fn timingsafe_bcmp(a: *const ::c_void, b: *const ::c_void, len: ::size_t) -> ::c_int;
233+
pub fn timingsafe_memcmp(a: *const ::c_void, b: *const ::c_void, len: ::size_t) -> ::c_int;
232234
}
233235

234236
cfg_if! {

src/unix/bsd/freebsdlike/freebsd/freebsd13/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,8 @@ extern "C" {
234234
pub fn getentropy(buf: *mut ::c_void, buflen: ::size_t) -> ::c_int;
235235
pub fn elf_aux_info(aux: ::c_int, buf: *mut ::c_void, buflen: ::c_int) -> ::c_int;
236236
pub fn setproctitle_fast(fmt: *const ::c_char, ...);
237+
pub fn timingsafe_bcmp(a: *const ::c_void, b: *const ::c_void, len: ::size_t) -> ::c_int;
238+
pub fn timingsafe_memcmp(a: *const ::c_void, b: *const ::c_void, len: ::size_t) -> ::c_int;
237239
}
238240

239241
cfg_if! {

0 commit comments

Comments
 (0)