diff --git a/libc-test/semver/linux-gnu.txt b/libc-test/semver/linux-gnu.txt index e3cfbbbb710d..9001de4c4ff3 100644 --- a/libc-test/semver/linux-gnu.txt +++ b/libc-test/semver/linux-gnu.txt @@ -626,6 +626,7 @@ malloc_stats malloc_trim malloc_usable_size mallopt +mempcpy mq_notify nl_mmap_hdr nl_mmap_req diff --git a/libc-test/semver/unix.txt b/libc-test/semver/unix.txt index 093dde173137..052c24178dfc 100644 --- a/libc-test/semver/unix.txt +++ b/libc-test/semver/unix.txt @@ -638,6 +638,7 @@ localtime_r lseek lstat malloc +memccpy memchr memcmp memcpy diff --git a/src/unix/linux_like/linux/gnu/mod.rs b/src/unix/linux_like/linux/gnu/mod.rs index 14e5dd5d1dd6..4f6da0a6b7dc 100644 --- a/src/unix/linux_like/linux/gnu/mod.rs +++ b/src/unix/linux_like/linux/gnu/mod.rs @@ -1431,6 +1431,8 @@ extern "C" { timeout: *const crate::timespec, sigmask: *const crate::sigset_t, ) -> c_int; + + pub fn mempcpy(dest: *mut c_void, src: *const c_void, n: size_t) -> *mut c_void; } cfg_if! { diff --git a/src/unix/mod.rs b/src/unix/mod.rs index 0ab7ae0fd19a..9154a0c43cfb 100644 --- a/src/unix/mod.rs +++ b/src/unix/mod.rs @@ -681,6 +681,7 @@ extern "C" { pub fn memcpy(dest: *mut c_void, src: *const c_void, n: size_t) -> *mut c_void; pub fn memmove(dest: *mut c_void, src: *const c_void, n: size_t) -> *mut c_void; pub fn memset(dest: *mut c_void, c: c_int, n: size_t) -> *mut c_void; + pub fn memccpy(dest: *mut c_void, src: *const c_void, c: c_int, n: size_t) -> *mut c_void; } extern "C" {