Skip to content

Commit

Permalink
Auto merge of #3252 - tibordp:android-memmem, r=JohnTitor
Browse files Browse the repository at this point in the history
android: add memmem

Adding `memmem` to Android bindings.

Android NDK has had `memmem` probably since the beginning but definitely as early as Android 2.2.

https://android.googlesource.com/platform/ndk.git/+/refs/tags/android-2.2_r1/build/platforms/android-3/arch-arm/usr/include/string.h#44
  • Loading branch information
bors committed May 23, 2023
2 parents e0ef910 + 47c881d commit 72d9121
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions libc-test/semver/android.txt
Expand Up @@ -3186,6 +3186,7 @@ memalign
memchr
memcmp
memcpy
memmem
memmove
memrchr
memset
Expand Down
7 changes: 7 additions & 0 deletions src/unix/linux_like/android/mod.rs
Expand Up @@ -3549,6 +3549,13 @@ extern "C" {

pub fn sync();
pub fn syncfs(fd: ::c_int) -> ::c_int;

pub fn memmem(
haystack: *const ::c_void,
haystacklen: ::size_t,
needle: *const ::c_void,
needlelen: ::size_t,
) -> *mut ::c_void;
}

cfg_if! {
Expand Down

0 comments on commit 72d9121

Please sign in to comment.