summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--librt/clock_nanosleep.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/librt/clock_nanosleep.c b/librt/clock_nanosleep.c
index 4cf1e06b4..85db72fb3 100644
--- a/librt/clock_nanosleep.c
+++ b/librt/clock_nanosleep.c
@@ -40,12 +40,14 @@ clock_nanosleep (clockid_t clock_id, int flags, const struct timespec *req,
r = INTERNAL_SYSCALL (clock_nanosleep, err, 4, clock_id, flags, req, rem);
else
{
+#ifdef __NEW_THREADS
int oldstate = LIBC_CANCEL_ASYNC ();
r = INTERNAL_SYSCALL (clock_nanosleep, err, 4, clock_id, flags, req,
rem);
LIBC_CANCEL_RESET (oldstate);
+#endif
}
return (INTERNAL_SYSCALL_ERROR_P (r, err)