blob: e933724cfd20cbaac5070e5ea32ccdc033115aca [file] [log] [blame]
Patrick Williamsddad1a12017-02-23 20:36:32 -06001Description: remove bionic specific calls
2Author: Fathi Boudra <fabo@debian.org>
3
4Upstream-Status: Inappropriate
5---
6 system/core/include/cutils/properties.h | 1 -
7 system/core/libcutils/properties.c | 2 +-
8 system/core/liblog/logd_write.c | 5 +++++
9 3 files changed, 6 insertions(+), 2 deletions(-)
10
11--- a/system/core/include/cutils/properties.h
12+++ b/system/core/include/cutils/properties.h
13@@ -19,7 +19,6 @@
14
15 #include <sys/cdefs.h>
16 #include <stddef.h>
17-#include <sys/system_properties.h>
18 #include <stdint.h>
19
20 #ifdef __cplusplus
21--- a/system/core/liblog/logd_write.c
22+++ b/system/core/liblog/logd_write.c
23@@ -23,6 +23,7 @@
24 #include <stdlib.h>
25 #include <string.h>
26 #include <sys/stat.h>
27+#include <sys/syscall.h>
28 #include <sys/types.h>
29 #if (FAKE_LOG_DEVICE == 0)
30 #include <sys/socket.h>
31@@ -205,7 +206,11 @@ static int __write_to_log_kernel(log_id_
32 realtime_ts.tv_nsec = ts.tv_nsec;
33
34 log_id_buf = log_id;
35+#ifdef __BIONIC__
36 tid = gettid();
37+#else
38+ tid = (pid_t) syscall(__NR_gettid);
39+#endif
40
41 newVec[0].iov_base = (unsigned char *) &log_id_buf;
42 newVec[0].iov_len = sizeof_log_id_t;
43--- a/system/core/libcutils/properties.c
44+++ b/system/core/libcutils/properties.c
45@@ -104,10 +104,10 @@ int32_t property_get_int32(const char *k
46 return (int32_t)property_get_imax(key, INT32_MIN, INT32_MAX, default_value);
47 }
48
49+#undef HAVE_LIBC_SYSTEM_PROPERTIES
50 #ifdef HAVE_LIBC_SYSTEM_PROPERTIES
51
52 #define _REALLY_INCLUDE_SYS__SYSTEM_PROPERTIES_H_
53-#include <sys/_system_properties.h>
54
55 int property_set(const char *key, const char *value)
56 {
57--- a/external/libselinux/src/procattr.c
58+++ b/external/libselinux/src/procattr.c
59@@ -8,7 +8,7 @@
60 #include "selinux_internal.h"
61 #include "policy.h"
62
63-#ifdef HOST
64+#ifndef __BIONIC__
65 static pid_t gettid(void)
66 {
67 return syscall(__NR_gettid);