about summary refs log tree commit diff
path: root/src/time/timer_settime.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/time/timer_settime.c')
-rw-r--r--src/time/timer_settime.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/time/timer_settime.c b/src/time/timer_settime.c
index d109570b..00708f0e 100644
--- a/src/time/timer_settime.c
+++ b/src/time/timer_settime.c
@@ -3,5 +3,7 @@
 
 int timer_settime(timer_t t, int flags, const struct itimerspec *val, struct itimerspec *old)
 {
-	return syscall(SYS_timer_settime, t->timerid, flags, val, old);
+	if ((uintptr_t)t & 1) t = (void *)((unsigned long)t / 2);
+	else t = ((pthread_t)t)->result;
+	return syscall(SYS_timer_settime, (long)t, flags, val, old);
 }