aboutsummaryrefslogtreecommitdiffstats
path: root/libselinux/src/procattr.c
diff options
context:
space:
mode:
authorWilliam Roberts <william.c.roberts@intel.com>2016-09-26 10:33:39 -0700
committerStephen Smalley <sds@tycho.nsa.gov>2016-09-26 15:15:31 -0400
commit0fdfdcc8a38e5c74c52d72380b42bd075aa0f20a (patch)
treec11bf0b5734d261119fb9a31e5cac039eea9f72b /libselinux/src/procattr.c
parent84d07ebd48c85902c8ac54359f2b345881f64ad2 (diff)
downloadandroid_external_selinux-0fdfdcc8a38e5c74c52d72380b42bd075aa0f20a.tar.gz
android_external_selinux-0fdfdcc8a38e5c74c52d72380b42bd075aa0f20a.tar.bz2
android_external_selinux-0fdfdcc8a38e5c74c52d72380b42bd075aa0f20a.zip
libselinux: add ifdef'ing for ANDROID and BUILD_HOST
On Android, certain discrepancies arise for unused functionality or for dealing with the differences in Bionic libc. This patch includes all the "ifdef'ing" required and introduces the BUILD_HOST define. The BUILD_HOST define removes functionality not needed when building libselinux for the Android build host machine. Note that not all the libselinux src files are used to build the host and target libraries on Android. Change-Id: I7984e7b769c4dfa627d6cf311411fa2c93bb7ef7 Signed-off-by: William Roberts <william.c.roberts@intel.com>
Diffstat (limited to 'libselinux/src/procattr.c')
-rw-r--r--libselinux/src/procattr.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libselinux/src/procattr.c b/libselinux/src/procattr.c
index eee4612c..7efcd7e1 100644
--- a/libselinux/src/procattr.c
+++ b/libselinux/src/procattr.c
@@ -22,10 +22,13 @@ static pthread_key_t destructor_key;
static int destructor_key_initialized = 0;
static __thread char destructor_initialized;
+#ifndef ANDROID
+/* Android declares this in unistd.h and has a definition for it */
static pid_t gettid(void)
{
return syscall(__NR_gettid);
}
+#endif
static void procattr_thread_destructor(void __attribute__((unused)) *unused)
{