about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/ptrace.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/ptrace.c')
-rw-r--r--sysdeps/unix/sysv/linux/ptrace.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sysdeps/unix/sysv/linux/ptrace.c b/sysdeps/unix/sysv/linux/ptrace.c
index 32cc990119..ede413a43c 100644
--- a/sysdeps/unix/sysv/linux/ptrace.c
+++ b/sysdeps/unix/sysv/linux/ptrace.c
@@ -46,12 +46,12 @@ ptrace (enum __ptrace_request request, ...)
     {
       if (request > 0 && request < 4)
 	{
-	  errno = 0;
+	  __set_errno (0);
 	  return ret;
 	}
       return res;
     }
 
-  errno = -res;
+  __set_errno (-res);
   return -1;
 }