summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/igt_aux.h3
-rw-r--r--tests/drm_import_export.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/igt_aux.h b/lib/igt_aux.h
index a6e3770e..24711aa2 100644
--- a/lib/igt_aux.h
+++ b/lib/igt_aux.h
@@ -32,6 +32,7 @@
#include <stdbool.h>
#include <stddef.h>
#include <sys/time.h>
+#include <sys/types.h>
#ifdef __linux__
# include <sys/syscall.h>
#endif
@@ -40,7 +41,7 @@
/* signal interrupt helpers */
#ifdef __linux__
-# define gettid() syscall(__NR_gettid)
+# define gettid() (pid_t)(syscall(__NR_gettid))
#endif
#define sigev_notify_thread_id _sigev_un._tid
diff --git a/tests/drm_import_export.c b/tests/drm_import_export.c
index e1b0abae..f79c09db 100644
--- a/tests/drm_import_export.c
+++ b/tests/drm_import_export.c
@@ -120,7 +120,7 @@ static void start_test(void)
static void * test_thread(void * par)
{
#ifdef __linux__
- igt_debug("start %ld\n", gettid());
+ igt_debug("start %ld\n", (long) gettid());
#else
igt_debug("start %ld\n", (long) pthread_self());
#endif