ndk: Patch malloc.h to remove clang warnings
authorFredrik Fornwall <fredrik@fornwall.net>
Thu, 19 Jan 2017 01:49:43 +0000 (02:49 +0100)
committerFredrik Fornwall <fredrik@fornwall.net>
Thu, 19 Jan 2017 01:49:43 +0000 (02:49 +0100)
ndk_patches/malloc.h.patch [new file with mode: 0644]
packages/ndk-sysroot/build.sh

diff --git a/ndk_patches/malloc.h.patch b/ndk_patches/malloc.h.patch
new file mode 100644 (file)
index 0000000..9c7c13b
--- /dev/null
@@ -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
index aa58545..787a976 100644 (file)
@@ -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"