diff --git a/libc-test/semver/linux-gnu.txt b/libc-test/semver/linux-gnu.txt index 5cbb3bc519e1..c3a39a309991 100644 --- a/libc-test/semver/linux-gnu.txt +++ b/libc-test/semver/linux-gnu.txt @@ -632,6 +632,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 e6272d3547b1..1d4c9c498cb6 100644 --- a/src/unix/linux_like/linux/gnu/mod.rs +++ b/src/unix/linux_like/linux/gnu/mod.rs @@ -1439,6 +1439,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" {