about summary refs log tree commit diff
path: root/sysdeps/unix
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix')
-rw-r--r--sysdeps/unix/sysv/linux/nanosleep.c9
-rw-r--r--sysdeps/unix/sysv/linux/not-cancel.h5
2 files changed, 12 insertions, 2 deletions
diff --git a/sysdeps/unix/sysv/linux/nanosleep.c b/sysdeps/unix/sysv/linux/nanosleep.c
index 2d15328e40..e7ac2c06aa 100644
--- a/sysdeps/unix/sysv/linux/nanosleep.c
+++ b/sysdeps/unix/sysv/linux/nanosleep.c
@@ -18,6 +18,7 @@
 
 #include <time.h>
 #include <sysdep-cancel.h>
+#include <not-cancel.h>
 
 /* Pause execution for a number of nanoseconds.  */
 int
@@ -28,3 +29,11 @@ __nanosleep (const struct timespec *requested_time,
 }
 hidden_def (__nanosleep)
 weak_alias (__nanosleep, nanosleep)
+
+int
+__nanosleep_nocancel (const struct timespec *requested_time,
+		      struct timespec *remaining)
+{
+  return INLINE_SYSCALL_CALL (nanosleep, requested_time, remaining);
+}
+hidden_def (__nanosleep_nocancel)
diff --git a/sysdeps/unix/sysv/linux/not-cancel.h b/sysdeps/unix/sysv/linux/not-cancel.h
index ac78cb38c3..577dca8297 100644
--- a/sysdeps/unix/sysv/linux/not-cancel.h
+++ b/sysdeps/unix/sysv/linux/not-cancel.h
@@ -26,6 +26,7 @@
 #include <unistd.h>
 #include <sys/syscall.h>
 #include <sys/wait.h>
+#include <time.h>
 
 /* Non cancellable open syscall.  */
 __typeof (open) __open_nocancel;
@@ -81,8 +82,8 @@ __typeof (pause) __pause_nocancel;
 libc_hidden_proto (__pause_nocancel)
 
 /* Uncancelable nanosleep.  */
-#define nanosleep_not_cancel(requested_time, remaining) \
-  INLINE_SYSCALL (nanosleep, 2, requested_time, remaining)
+__typeof (__nanosleep) __nanosleep_nocancel;
+hidden_proto (__nanosleep_nocancel)
 
 /* Uncancelable sigsuspend.  */
 #define sigsuspend_not_cancel(set) \