summaryrefslogtreecommitdiffstats
path: root/tests/update2.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/update2.c')
-rw-r--r--tests/update2.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/update2.c b/tests/update2.c
index 5805163d..1dcff3fc 100644
--- a/tests/update2.c
+++ b/tests/update2.c
@@ -39,7 +39,7 @@ main (int argc, char *argv[] __attribute__ ((unused)))
Elf32_Phdr *phdr;
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));
@@ -144,6 +144,7 @@ main (int argc, char *argv[] __attribute__ ((unused)))
exit (1);
}
+ close (fd);
unlink (fname);
return 0;