diff options
Diffstat (limited to 'tests/update3.c')
| -rw-r--r-- | tests/update3.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/update3.c b/tests/update3.c index 7a4224dd..9d4f8809 100644 --- a/tests/update3.c +++ b/tests/update3.c @@ -46,7 +46,7 @@ main (int argc, char *argv[] __attribute__ ((unused))) Dwelf_Strent *shstrtabse; 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)); @@ -199,6 +199,7 @@ main (int argc, char *argv[] __attribute__ ((unused))) exit (1); } + close (fd); unlink (fname); return 0; |
