From: Fredrik Fornwall Date: Mon, 11 Apr 2016 13:15:57 +0000 (-0400) Subject: stdio.h: Avoid pulling in complete fcntl.h X-Git-Url: https://git.distorted.org.uk/~mdw/termux-packages/commitdiff_plain/b29ec8d981e3ad1320313e0b32d36717dc2fc577?hp=2763362397c1cc9f3bc9c63e12fd5b667f679fef stdio.h: Avoid pulling in complete fcntl.h This pollutes the namespace and breaks building e.g. python, which defines a tee() function. --- diff --git a/ndk_patches/stdio.h.patch b/ndk_patches/stdio.h.patch index 600c79e1..c64fda15 100644 --- a/ndk_patches/stdio.h.patch +++ b/ndk_patches/stdio.h.patch @@ -6,7 +6,7 @@ diff -u -r /home/fornwall/lib/android-ndk/platforms/android-21/arch-arm/usr/incl #include +#include /* For strcpy(3) used by ctermid() */ -+#include /* For O_RDWR and other O_* constants */ ++#include /* For O_RDWR and other O_* constants */ +#include /* For arc4random() */ + #define __need_NULL @@ -46,12 +46,15 @@ diff -u -r /home/fornwall/lib/android-ndk/platforms/android-21/arch-arm/usr/incl #if defined(__BIONIC_FORTIFY) __BEGIN_DECLS -@@ -462,4 +474,26 @@ +@@ -462,4 +474,29 @@ #endif /* defined(__BIONIC_FORTIFY) */ +__BEGIN_DECLS + ++extern int open(const char*, int, ...); ++extern pid_t getpid(); ++extern int unlink(const char*); +static FILE* tmpfile() { + int p = getpid(); + char* path;