| 1 | diff -u -r /home/fornwall/lib/android-ndk/platforms/android-21/arch-arm/usr/include/stdio.h ./usr/include/stdio.h |
| 2 | --- /home/fornwall/lib/android-ndk/platforms/android-21/arch-arm/usr/include/stdio.h 2014-10-14 22:53:49.000000000 -0400 |
| 3 | +++ ./usr/include/stdio.h 2015-12-24 03:07:45.028840214 -0500 |
| 4 | @@ -52,6 +52,8 @@ |
| 5 | #include <stdarg.h> |
| 6 | #include <stddef.h> |
| 7 | |
| 8 | +#include <string.h> /* For strcpy(3) used by ctermid() */ |
| 9 | + |
| 10 | #define __need_NULL |
| 11 | #include <stddef.h> |
| 12 | |
| 13 | @@ -193,7 +195,7 @@ |
| 14 | |
| 15 | /* System V/ANSI C; this is the wrong way to do this, do *not* use these. */ |
| 16 | #if __BSD_VISIBLE || __XPG_VISIBLE |
| 17 | -#define P_tmpdir "/tmp/" |
| 18 | +#define P_tmpdir "@TERMUX_PREFIX@/tmp/" |
| 19 | #endif |
| 20 | #define L_tmpnam 1024 /* XXX must be == PATH_MAX */ |
| 21 | #define TMP_MAX 308915776 |
| 22 | @@ -371,6 +373,16 @@ |
| 23 | #define fwopen(cookie, fn) funopen(cookie, 0, fn, 0, 0) |
| 24 | #endif /* __BSD_VISIBLE */ |
| 25 | |
| 26 | +/* Needed by gnulibs freading() */ |
| 27 | +#define __sferror(p) (((p)->_flags & __SERR) != 0) |
| 28 | + |
| 29 | +/* Used by perl, fish, and others */ |
| 30 | +static char* ctermid(char* s) { |
| 31 | + if (s == 0) return "/dev/tty"; |
| 32 | + strcpy(s, "/dev/tty"); |
| 33 | + return s; |
| 34 | +} |
| 35 | + |
| 36 | #if defined(__BIONIC_FORTIFY) |
| 37 | |
| 38 | __BEGIN_DECLS |