1 See https://github.com/android-ndk/ndk/issues/440
3 diff -u -r /home/fornwall/lib/android-ndk/sysroot/usr/include/string.h ./usr/include/string.h
4 --- /home/fornwall/lib/android-ndk/sysroot/usr/include/string.h 2017-06-20 17:41:56.000000000 +0200
5 +++ ./usr/include/string.h 2017-06-30 22:15:01.161342640 +0200
7 #endif /* __ANDROID_API__ >= 18 */
10 +#if __ANDROID_API__ >= 24
11 #if defined(__cplusplus)
12 extern "C++" char* strchrnul(char* _Nonnull, int) __RENAME(strchrnul) __attribute_pure__;
13 extern "C++" const char* strchrnul(const char* _Nonnull, int) __RENAME(strchrnul) __attribute_pure__;
16 -#if __ANDROID_API__ >= 24
17 char* strchrnul(const char* _Nonnull, int) __attribute_pure__ __INTRODUCED_IN(24);
18 #endif /* __ANDROID_API__ >= 24 */
23 #if defined(__USE_GNU) && !defined(basename)
24 +#if __ANDROID_API__ >= 23
26 * glibc has a basename in <string.h> that's different to the POSIX one in <libgen.h>.
27 * It doesn't modify its argument, and in C++ it's const-correct.
29 extern "C++" const char* basename(const char* _Nonnull) __RENAME(__gnu_basename);
32 -#if __ANDROID_API__ >= 23
33 char* basename(const char* _Nonnull) __RENAME(__gnu_basename) __INTRODUCED_IN(23);
34 #endif /* __ANDROID_API__ >= 23 */
37 #pragma clang diagnostic pop
40 +/* Termux: Patched support for GNU extension function mempcpy(3): */
41 +#if defined(_GNU_SOURCE) && defined(TERMUX_EXPOSE_MEMPCPY)
42 +static void* mempcpy(void* dest, void const* src, size_t n)
44 + return memcpy(dest, src, n) + n;
50 #endif /* _STRING_H */