From 7076ea1bd6ec56cd7c85541a5d2b1bcdeaee85db Mon Sep 17 00:00:00 2001 From: Oscar Mateo Date: Tue, 12 Nov 2013 11:50:40 +0000 Subject: [PATCH] tests/drm_get_client_auth: In Android, use gettid() instead of syscall(SYS_gettid) Signed-off-by: Oscar Mateo Signed-off-by: Daniel Vetter --- tests/drm_get_client_auth.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/drm_get_client_auth.c b/tests/drm_get_client_auth.c index 28e1b3db..2f493f94 100644 --- a/tests/drm_get_client_auth.c +++ b/tests/drm_get_client_auth.c @@ -47,9 +47,13 @@ static bool is_local_tid(pid_t tid) { - /* On Linux systems, drmGetClient() would return the thread ID - instead of the actual process ID */ - return syscall(SYS_gettid) == tid; +#ifndef ANDROID + /* On Linux systems, drmGetClient() would return the thread ID + instead of the actual process ID */ + return syscall(SYS_gettid) == tid; +#else + return gettid() == tid; +#endif }