From: Tom Cherry <tomcherry@google.com>
To: selinux@tycho.nsa.gov
Cc: nnk@google.com, enh@google.com, Tom Cherry <tomcherry@google.com>
Subject: [PATCH] procattr.c: Use __BIONIC__ instead of __ANDROID__
Date: Thu, 11 May 2017 16:50:02 -0700 [thread overview]
Message-ID: <20170511235002.26468-1-tomcherry@google.com> (raw)
This check is not specific to Android devices. If libselinux were used
with Bionic on a normal Linux system this check would still be needed.
Signed-off-by: Tom Cherry <tomcherry@google.com>
---
libselinux/src/procattr.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libselinux/src/procattr.c b/libselinux/src/procattr.c
index ebc0adec..48dd8aff 100644
--- a/libselinux/src/procattr.c
+++ b/libselinux/src/procattr.c
@@ -22,8 +22,8 @@ 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 */
+#ifndef __BIONIC__
+/* Bionic declares this in unistd.h and has a definition for it */
static pid_t gettid(void)
{
return syscall(__NR_gettid);
--
2.13.0.rc2.291.g57267f2277-goog
next reply other threads:[~2017-05-11 23:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-11 23:50 Tom Cherry [this message]
2017-05-12 0:18 ` [PATCH] procattr.c: Use __BIONIC__ instead of __ANDROID__ William Roberts
2017-05-12 0:19 ` enh
2017-05-12 13:22 ` Stephen Smalley
2017-05-12 18:01 ` Tom Cherry
2017-05-12 22:11 ` William Roberts
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170511235002.26468-1-tomcherry@google.com \
--to=tomcherry@google.com \
--cc=enh@google.com \
--cc=nnk@google.com \
--cc=selinux@tycho.nsa.gov \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.