update ndk-patches to prevent creation of *.orig files in ./sysroot/usr/include

This commit is contained in:
Leonid Pliushch 2019-03-20 15:37:12 +02:00
parent 958cccd505
commit 57b77ff692
6 changed files with 32 additions and 33 deletions

View File

@ -1,7 +1,7 @@
diff -u -r /home/fornwall/lib/android-ndk/sysroot/usr/include/linux/fcntl.h ./usr/include/linux/fcntl.h
--- /home/fornwall/lib/android-ndk/sysroot/usr/include/linux/fcntl.h 2017-11-09 09:57:12.000000000 +0100
+++ ./usr/include/linux/fcntl.h 2017-11-15 11:49:10.709710452 +0100
@@ -40,6 +40,12 @@
diff -uNr sysroot.orig/usr/include/linux/fcntl.h sysroot/usr/include/linux/fcntl.h
--- sysroot.orig/usr/include/linux/fcntl.h 2019-02-12 16:12:24.000000000 +0000
+++ sysroot/usr/include/linux/fcntl.h 2019-03-20 13:22:32.823142545 +0000
@@ -50,6 +50,12 @@
#define DN_ATTRIB 0x00000020
#define DN_MULTISHOT 0x80000000
#define AT_FDCWD - 100

View File

@ -1,7 +1,7 @@
diff -u -r /home/fornwall/lib/android-ndk/sysroot/usr/include/pwd.h ./usr/include/pwd.h
--- /home/fornwall/lib/android-ndk/sysroot/usr/include/pwd.h 2017-06-20 17:41:56.000000000 +0200
+++ ./usr/include/pwd.h 2017-06-26 11:45:26.036064547 +0200
@@ -89,7 +91,6 @@
diff -uNr sysroot.orig/usr/include/pwd.h sysroot/usr/include/pwd.h
--- sysroot.orig/usr/include/pwd.h 2019-02-12 16:12:24.000000000 +0000
+++ sysroot/usr/include/pwd.h 2019-03-20 13:26:24.283060011 +0000
@@ -89,13 +89,58 @@
struct passwd* getpwent(void) __INTRODUCED_IN(26);
void setpwent(void) __INTRODUCED_IN(26);
@ -9,11 +9,9 @@ diff -u -r /home/fornwall/lib/android-ndk/sysroot/usr/include/pwd.h ./usr/includ
#endif /* __ANDROID_API__ >= 26 */
@@ -97,6 +98,52 @@
int getpwnam_r(const char* __name, struct passwd* __pwd, char* __buf, size_t __n, struct passwd** __result) __INTRODUCED_IN(12);
int getpwuid_r(uid_t __uid, struct passwd* __pwd, char* __buf, size_t __n, struct passwd** __result) __INTRODUCED_IN(12);
+
+int access(const char* __path, int __mode);
+
+static void android_setup_pwd(struct passwd* pw) {
@ -59,6 +57,7 @@ diff -u -r /home/fornwall/lib/android-ndk/sysroot/usr/include/pwd.h ./usr/includ
+#define getpwuid android_polyfill_getpwuid
+#define getpwuid_r android_polyfill_getpwuid_r
+static void endpwent(void) { /* Do nothing. */ }
+
__END_DECLS
#endif

View File

@ -1,15 +1,15 @@
diff -u -r /home/fornwall/lib/android-ndk/sysroot/usr/include/stdlib.h ./usr/include/stdlib.h
--- /home/fornwall/lib/android-ndk/sysroot/usr/include/stdlib.h 2017-11-09 09:57:12.000000000 +0100
+++ ./usr/include/stdlib.h 2017-11-15 12:49:51.790799140 +0100
@@ -35,6 +35,7 @@
#include <alloca.h>
diff -uNr sysroot.orig/usr/include/stdlib.h sysroot/usr/include/stdlib.h
--- sysroot.orig/usr/include/stdlib.h 2019-02-12 16:12:24.000000000 +0000
+++ sysroot/usr/include/stdlib.h 2019-03-20 13:23:48.870108924 +0000
@@ -33,6 +33,7 @@
#include <bits/wait.h>
#include <malloc.h>
#include <stddef.h>
+#include <stdint.h>
#include <sys/cdefs.h>
#include <xlocale.h>
@@ -205,8 +206,7 @@
@@ -211,8 +212,7 @@
size_t wcstombs(char* __dst, const wchar_t* __src, size_t __n);
#if __ANDROID_API__ >= __ANDROID_API_L__

View File

@ -1,7 +1,7 @@
diff -u -r /home/fornwall/lib/android-ndk/sysroot/usr/include/sys/cdefs.h ./usr/include/sys/cdefs.h
--- /home/fornwall/lib/android-ndk/sysroot/usr/include/sys/cdefs.h 2017-07-21 11:04:10.000000000 +0200
+++ ./usr/include/sys/cdefs.h 2017-08-07 22:50:14.093361547 +0200
@@ -218,7 +218,11 @@
diff -uNr sysroot.orig/usr/include/sys/cdefs.h sysroot/usr/include/sys/cdefs.h
--- sysroot.orig/usr/include/sys/cdefs.h 2019-02-12 16:12:24.000000000 +0000
+++ sysroot/usr/include/sys/cdefs.h 2019-03-20 13:27:29.977876824 +0000
@@ -206,7 +206,11 @@
* _FILE_OFFSET_BITS 64 support.
* See https://android.googlesource.com/platform/bionic/+/master/docs/32-bit-abi.md
*/

View File

@ -1,7 +1,7 @@
diff -u -r /home/fornwall/lib/android-ndk/sysroot/usr/include/sys/wait.h ./usr/include/sys/wait.h
--- /home/fornwall/lib/android-ndk/sysroot/usr/include/sys/wait.h 2017-06-07 01:07:52.000000000 +0200
+++ ./usr/include/sys/wait.h 2017-06-18 02:11:22.268075841 +0200
@@ -57,6 +57,9 @@
diff -uNr sysroot.orig/usr/include/sys/wait.h sysroot/usr/include/sys/wait.h
--- sysroot.orig/usr/include/sys/wait.h 2019-02-12 16:12:24.000000000 +0000
+++ sysroot/usr/include/sys/wait.h 2019-03-20 13:28:06.689331544 +0000
@@ -46,6 +46,9 @@
// Implemented as a static inline before 18.
#endif

View File

@ -1,7 +1,7 @@
diff -Nur /Users/fornwall/lib/android-ndk/platforms/android-18/arch-arm/usr/include/syslog.h ./usr/include/syslog.h
--- /Users/fornwall/lib/android-ndk/platforms/android-18/arch-arm/usr/include/syslog.h 2012-08-21 07:23:12.000000000 +0200
+++ ./usr/include/syslog.h 2014-01-29 17:51:55.000000000 +0100
@@ -31,6 +31,8 @@
diff -uNr sysroot.orig/usr/include/syslog.h sysroot/usr/include/syslog.h
--- sysroot.orig/usr/include/syslog.h 2019-02-12 16:12:24.000000000 +0000
+++ sysroot/usr/include/syslog.h 2019-03-20 13:19:44.315965728 +0000
@@ -32,6 +32,8 @@
#include <stdio.h>
#include <sys/cdefs.h>
#include <stdarg.h>
@ -10,9 +10,9 @@ diff -Nur /Users/fornwall/lib/android-ndk/platforms/android-18/arch-arm/usr/incl
__BEGIN_DECLS
@@ -111,6 +112,64 @@
extern void syslog_r(int, struct syslog_data *, const char *, ...);
extern void vsyslog_r(int, struct syslog_data *, const char *, va_list);
@@ -92,6 +94,64 @@
void syslog(int __priority, const char* __fmt, ...) __printflike(2, 3);
void vsyslog(int __priority, const char* __fmt, va_list __args) __printflike(2, 0);
+extern /*const*/ char* __progname;
+static __inline__ void android_polyfill_openlog(const char* a, int b, int c) {