openbsd add lsearch/lfind fn.

This commit is contained in:
David Carlier 2022-03-03 08:16:36 +00:00
parent cd875d3072
commit 13eda020dc
3 changed files with 18 additions and 0 deletions

View file

@ -430,6 +430,7 @@ fn test_openbsd(target: &str) {
"resolv.h",
"pthread.h",
"dlfcn.h",
"search.h",
"signal.h",
"string.h",
"sys/file.h",

View file

@ -1014,9 +1014,11 @@ labs
lastlog
lcong48
lcong48_deterministic
lfind
lockf
login_tty
lrand48
lsearch
madvise
malloc_conceal
memmem

View file

@ -1637,6 +1637,21 @@ extern "C" {
pub fn srand48_deterministic(seed: ::c_long);
pub fn seed48_deterministic(xseed: *mut ::c_ushort) -> *mut ::c_ushort;
pub fn lcong48_deterministic(p: *mut ::c_ushort);
pub fn lsearch(
key: *const ::c_void,
base: *mut ::c_void,
nelp: *mut ::size_t,
width: ::size_t,
compar: ::Option<unsafe extern "C" fn(*const ::c_void, *const ::c_void) -> ::c_int>,
) -> *mut ::c_void;
pub fn lfind(
key: *const ::c_void,
base: *const ::c_void,
nelp: *mut ::size_t,
width: ::size_t,
compar: ::Option<unsafe extern "C" fn(*const ::c_void, *const ::c_void) -> ::c_int>,
) -> *mut ::c_void;
}
#[link(name = "execinfo")]