summaryrefslogtreecommitdiff
path: root/development/android-tools/fix_build.patch
blob: 9f96915ecdc9cbbfadb6e0d35d2168673dfbe04b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
diff -ru core.org/adb/sysdeps.h core/adb/sysdeps.h
--- core.org/adb/sysdeps.h	2016-11-07 10:10:52.000000000 +0100
+++ core/adb/sysdeps.h	2016-11-07 16:57:55.952716945 +0100
@@ -25,6 +25,7 @@
 #endif
 
 #include <errno.h>
+#include <sys/syscall.h>
 
 #include <string>
 #include <vector>
@@ -810,7 +811,7 @@
 
 static __inline__ unsigned long adb_thread_id()
 {
-    return (unsigned long)gettid();
+    return syscall(__NR_gettid);
 }
 
 #endif /* !_WIN32 */
diff -ru core.org/base/errors_unix.cpp core/base/errors_unix.cpp
--- core.org/base/errors_unix.cpp	2016-11-07 10:10:52.000000000 +0100
+++ core/base/errors_unix.cpp	2016-11-07 10:44:15.217399254 +0100
@@ -17,6 +17,7 @@
 #include "android-base/errors.h"
 
 #include <errno.h>
+#include <string.h>
 
 namespace android {
 namespace base {
diff -ru core.org/base/file.cpp core/base/file.cpp
--- core.org/base/file.cpp	2016-11-07 10:10:52.000000000 +0100
+++ core/base/file.cpp	2016-11-07 10:44:35.901793592 +0100
@@ -20,6 +20,7 @@
 #include <fcntl.h>
 #include <sys/stat.h>
 #include <sys/types.h>
+#include <string.h>
 
 #include <string>
 
diff -ru core.org/base/logging.cpp core/base/logging.cpp
--- core.org/base/logging.cpp	2016-11-07 10:10:52.000000000 +0100
+++ core/base/logging.cpp	2016-11-07 10:45:12.527487064 +0100
@@ -21,6 +21,7 @@
 #include "android-base/logging.h"
 
 #include <libgen.h>
+#include <string.h>
 
 // For getprogname(3) or program_invocation_short_name.
 #if defined(__ANDROID__) || defined(__APPLE__)