serf: Fix building with unified headers
[termux-packages] / ndk_patches / string.h.patch
1 diff -u -r /home/fornwall/lib/android-ndk/platforms/android-21/arch-arm/usr/include/string.h ./usr/include/string.h
2 --- /home/fornwall/lib/android-ndk/platforms/android-21/arch-arm/usr/include/string.h 2014-12-02 22:38:31.000000000 -0500
3 +++ ./usr/include/string.h 2015-05-08 23:00:18.591924680 -0400
4 @@ -289,6 +289,14 @@
5
6 #endif /* defined(__BIONIC_FORTIFY) */
7
8 +/* Termux: Patched support for GNU extension function mempcpy(3): */
9 +#if defined(_GNU_SOURCE) && defined(TERMUX_EXPOSE_MEMPCPY)
10 +static void* mempcpy(void* dest, void const* src, size_t n)
11 +{
12 + return memcpy(dest, src, n) + n;
13 +}
14 +#endif
15 +
16 __END_DECLS
17
18 #endif /* _STRING_H_ */