Skip to content

Commit 13eda02

Browse files
committed
openbsd add lsearch/lfind fn.
1 parent cd875d3 commit 13eda02

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

libc-test/build.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,7 @@ fn test_openbsd(target: &str) {
430430
"resolv.h",
431431
"pthread.h",
432432
"dlfcn.h",
433+
"search.h",
433434
"signal.h",
434435
"string.h",
435436
"sys/file.h",

libc-test/semver/openbsd.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1014,9 +1014,11 @@ labs
10141014
lastlog
10151015
lcong48
10161016
lcong48_deterministic
1017+
lfind
10171018
lockf
10181019
login_tty
10191020
lrand48
1021+
lsearch
10201022
madvise
10211023
malloc_conceal
10221024
memmem

src/unix/bsd/netbsdlike/openbsd/mod.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1637,6 +1637,21 @@ extern "C" {
16371637
pub fn srand48_deterministic(seed: ::c_long);
16381638
pub fn seed48_deterministic(xseed: *mut ::c_ushort) -> *mut ::c_ushort;
16391639
pub fn lcong48_deterministic(p: *mut ::c_ushort);
1640+
1641+
pub fn lsearch(
1642+
key: *const ::c_void,
1643+
base: *mut ::c_void,
1644+
nelp: *mut ::size_t,
1645+
width: ::size_t,
1646+
compar: ::Option<unsafe extern "C" fn(*const ::c_void, *const ::c_void) -> ::c_int>,
1647+
) -> *mut ::c_void;
1648+
pub fn lfind(
1649+
key: *const ::c_void,
1650+
base: *const ::c_void,
1651+
nelp: *mut ::size_t,
1652+
width: ::size_t,
1653+
compar: ::Option<unsafe extern "C" fn(*const ::c_void, *const ::c_void) -> ::c_int>,
1654+
) -> *mut ::c_void;
16401655
}
16411656

16421657
#[link(name = "execinfo")]

0 commit comments

Comments
 (0)