Skip to content

Commit 3e1791c

Browse files
committed
Merge pull request rust-lang#102 from fhahn/add-memrchr
Add binding for memrchr on Linux
2 parents ab53d5e + 6bb23a1 commit 3e1791c

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

src/unix/bsd/freebsdlike/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -575,6 +575,7 @@ extern {
575575
len: ::off_t) -> ::c_int;
576576
pub fn sched_setscheduler(pid: ::pid_t, policy: ::c_int, param: *const sched_param) -> ::c_int;
577577
pub fn sched_getscheduler(pid: ::pid_t) -> ::c_int;
578+
pub fn memrchr(cx: *const ::c_void, c: ::c_int, n: ::size_t) -> *mut ::c_void;
578579
}
579580

580581
cfg_if! {

src/unix/bsd/openbsdlike/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,7 @@ extern {
363363
pub fn pthread_set_name_np(tid: ::pthread_t, name: *const ::c_char);
364364
pub fn pthread_stackseg_np(thread: ::pthread_t,
365365
sinfo: *mut ::stack_t) -> ::c_uint;
366+
pub fn memrchr(cx: *const ::c_void, c: ::c_int, n: ::size_t) -> *mut ::c_void;
366367
}
367368

368369
cfg_if! {

src/unix/notbsd/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -606,6 +606,7 @@ extern {
606606
arg: *mut ::c_void, ...) -> ::c_int;
607607
pub fn statfs(path: *const ::c_char, buf: *mut statfs) -> ::c_int;
608608
pub fn fstatfs(fd: ::c_int, buf: *mut statfs) -> ::c_int;
609+
pub fn memrchr(cx: *const ::c_void, c: ::c_int, n: ::size_t) -> *mut ::c_void;
609610
}
610611

611612
cfg_if! {

0 commit comments

Comments
 (0)