From 86b59f8474a38b7a0e9c4cf68e32aba664878107 Mon Sep 17 00:00:00 2001 From: Arkadiusz Hiler Date: Wed, 12 Apr 2017 09:28:45 +0200 Subject: lib/igt_aux: Include unistd.h for gettid() on Android We define gettid() using syscall() because glibc does not provide a wrapper. Android's bionic got the syscall covered though. Signed-off-by: Arkadiusz Hiler Reviewed-by: Petri Latvala --- lib/igt_aux.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/igt_aux.h') diff --git a/lib/igt_aux.h b/lib/igt_aux.h index e62858e6..54b97164 100644 --- a/lib/igt_aux.h +++ b/lib/igt_aux.h @@ -43,7 +43,12 @@ extern int num_trash_bos; #define NSEC_PER_SEC (1000*USEC_PER_SEC) /* signal interrupt helpers */ +#ifdef ANDROID +#include /* on Android bionic has this implemented */ +#else #define gettid() syscall(__NR_gettid) +#endif + #define sigev_notify_thread_id _sigev_un._tid /* auxialiary igt helpers from igt_aux.c */ -- cgit v1.2.3