summaryrefslogtreecommitdiffstats
path: root/tests/update1.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/update1.c')
-rw-r--r--tests/update1.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/update1.c b/tests/update1.c
index f4c14753..548c6d8a 100644
--- a/tests/update1.c
+++ b/tests/update1.c
@@ -38,7 +38,7 @@ main (int argc, char *argv[] __attribute__ ((unused)))
Elf32_Ehdr *ehdr;
int i;
- fd = open (fname, O_RDWR | O_CREAT | O_TRUNC, 0666);
+ fd = open (fname, O_RDWR | O_BINARY | O_CREAT | O_TRUNC, 0666);
if (fd == -1)
{
printf ("cannot open `%s': %s\n", fname, strerror (errno));
@@ -121,6 +121,7 @@ main (int argc, char *argv[] __attribute__ ((unused)))
exit (1);
}
+ close (fd);
unlink (fname);
return 0;