From: Fredrik Fornwall Date: Thu, 19 Jan 2017 01:49:43 +0000 (+0100) Subject: ndk: Patch malloc.h to remove clang warnings X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/termux-packages/commitdiff_plain/7f5da5d3af822c6b7e0f17ec1119a1268240e543 ndk: Patch malloc.h to remove clang warnings --- diff --git a/ndk_patches/malloc.h.patch b/ndk_patches/malloc.h.patch new file mode 100644 index 00000000..9c7c13b7 --- /dev/null +++ b/ndk_patches/malloc.h.patch @@ -0,0 +1,20 @@ +diff -u -r /home/fornwall/lib/android-ndk/platforms/android-21/arch-arm64/usr/include/malloc.h ./usr/include/malloc.h +--- /home/fornwall/lib/android-ndk/platforms/android-21/arch-arm64/usr/include/malloc.h 2016-09-29 14:42:26.000000000 +0200 ++++ ./usr/include/malloc.h 2017-01-19 02:48:15.961754659 +0100 +@@ -27,12 +27,12 @@ + + __BEGIN_DECLS + +-extern void* malloc(size_t byte_count) __mallocfunc __wur __attribute__((alloc_size(1))); +-extern void* calloc(size_t item_count, size_t item_size) __mallocfunc __wur __attribute__((alloc_size(1,2))); +-extern void* realloc(void* p, size_t byte_count) __wur __attribute__((alloc_size(2))); ++extern void* malloc(size_t byte_count) __mallocfunc __wur; ++extern void* calloc(size_t item_count, size_t item_size) __mallocfunc __wur; ++extern void* realloc(void* p, size_t byte_count) __wur; + extern void free(void* p); + +-extern void* memalign(size_t alignment, size_t byte_count) __mallocfunc __wur __attribute__((alloc_size(2))); ++extern void* memalign(size_t alignment, size_t byte_count) __mallocfunc __wur; + extern size_t malloc_usable_size(const void* p); + + #ifndef STRUCT_MALLINFO_DECLARED diff --git a/packages/ndk-sysroot/build.sh b/packages/ndk-sysroot/build.sh index aa585454..787a976d 100644 --- a/packages/ndk-sysroot/build.sh +++ b/packages/ndk-sysroot/build.sh @@ -1,7 +1,7 @@ TERMUX_PKG_HOMEPAGE=https://developer.android.com/tools/sdk/ndk/index.html TERMUX_PKG_DESCRIPTION="System header and library files from the Android NDK needed for compiling C programs" TERMUX_PKG_VERSION=$TERMUX_NDK_VERSION -TERMUX_PKG_REVISION=6 +TERMUX_PKG_REVISION=7 TERMUX_PKG_NO_DEVELSPLIT=yes # Depend on libandroid-support-dev so that iconv.h and libintl.h are available: TERMUX_PKG_DEPENDS="libandroid-support-dev"