summaryrefslogtreecommitdiff
path: root/lib/igt_aux.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/igt_aux.h')
-rw-r--r--lib/igt_aux.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/igt_aux.h b/lib/igt_aux.h
index 24711aa2..04d22904 100644
--- a/lib/igt_aux.h
+++ b/lib/igt_aux.h
@@ -33,6 +33,7 @@
#include <stddef.h>
#include <sys/time.h>
#include <sys/types.h>
+#include <unistd.h>
#ifdef __linux__
# include <sys/syscall.h>
#endif
@@ -41,7 +42,9 @@
/* signal interrupt helpers */
#ifdef __linux__
-# define gettid() (pid_t)(syscall(__NR_gettid))
+# ifndef HAVE_GETTID
+# define gettid() (pid_t)(syscall(__NR_gettid))
+# endif
#endif
#define sigev_notify_thread_id _sigev_un._tid