about summary refs log tree commit diff
path: root/time
diff options
context:
space:
mode:
Diffstat (limited to 'time')
-rw-r--r--time/tst-cpuclock1.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/time/tst-cpuclock1.c b/time/tst-cpuclock1.c
index 6f2e70a58a..6a793e06df 100644
--- a/time/tst-cpuclock1.c
+++ b/time/tst-cpuclock1.c
@@ -27,6 +27,8 @@
 #include <stdint.h>
 #include <sys/wait.h>
 
+#include <support/xunistd.h>
+
 /* This function is intended to rack up both user and system time.  */
 static void
 chew_cpu (void)
@@ -41,7 +43,7 @@ chew_cpu (void)
       for (int i = 0; i < 100; ++i)
 	for (size_t j = 0; j < sizeof buf; ++j)
 	  buf[j] = 0xbb;
-      write (nullfd, (char *) buf, sizeof buf);
+      xwrite (nullfd, (char *) buf, sizeof buf);
       close (nullfd);
       if (getppid () == 1)
 	_exit (2);