about summary refs log tree commit diff
path: root/sysdeps/pthread/tst-key1.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/pthread/tst-key1.c')
-rw-r--r--sysdeps/pthread/tst-key1.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/sysdeps/pthread/tst-key1.c b/sysdeps/pthread/tst-key1.c
index 933edafef8..60245c4e47 100644
--- a/sysdeps/pthread/tst-key1.c
+++ b/sysdeps/pthread/tst-key1.c
@@ -21,6 +21,7 @@
 #include <stdlib.h>
 #include <unistd.h>
 
+#include <support/xunistd.h>
 
 static int do_test (void);
 
@@ -51,7 +52,7 @@ do_test (void)
 
 	if (pthread_setspecific (keys[i], (const void *) (i + 100l)) != 0)
 	  {
-	    write (2, "setspecific failed\n", 19);
+	    xwrite (2, "setspecific failed\n", 19);
 	    _exit (1);
 	  }
       }
@@ -60,13 +61,13 @@ do_test (void)
     {
       if (pthread_getspecific (keys[i]) != (void *) (i + 100l))
 	{
-	  write (2, "getspecific failed\n", 19);
+	  xwrite (2, "getspecific failed\n", 19);
 	  _exit (1);
 	}
 
       if (pthread_key_delete (keys[i]) != 0)
 	{
-	  write (2, "key_delete failed\n", 18);
+	  xwrite (2, "key_delete failed\n", 18);
 	  _exit (1);
 	}
     }
@@ -74,13 +75,13 @@ do_test (void)
   /* Now it must be once again possible to allocate keys.  */
   if (pthread_key_create (&keys[0], NULL) != 0)
     {
-      write (2, "2nd key_create failed\n", 22);
+      xwrite (2, "2nd key_create failed\n", 22);
       _exit (1);
     }
 
   if (pthread_key_delete (keys[0]) != 0)
     {
-      write (2, "2nd key_delete failed\n", 22);
+      xwrite (2, "2nd key_delete failed\n", 22);
       _exit (1);
     }