aboutsummaryrefslogtreecommitdiff
path: root/libio/bug-ungetc.c
diff options
context:
space:
mode:
Diffstat (limited to 'libio/bug-ungetc.c')
-rw-r--r--libio/bug-ungetc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libio/bug-ungetc.c b/libio/bug-ungetc.c
index 51940b68f5..4ea2d14ed6 100644
--- a/libio/bug-ungetc.c
+++ b/libio/bug-ungetc.c
@@ -2,6 +2,8 @@
#include <stdio.h>
+#include <support/xunistd.h>
+
static void do_prepare (void);
#define PREPARE(argc, argv) do_prepare ()
static int do_test (void);
@@ -20,7 +22,7 @@ do_prepare (void)
printf ("cannot create temporary file: %m\n");
exit (1);
}
- write (fd, pattern, sizeof (pattern));
+ xwrite (fd, pattern, sizeof (pattern));
close (fd);
}