summaryrefslogtreecommitdiffstats
path: root/tests/vendorelf.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/vendorelf.c')
-rw-r--r--tests/vendorelf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/vendorelf.c b/tests/vendorelf.c
index bc13cce3..835e941f 100644
--- a/tests/vendorelf.c
+++ b/tests/vendorelf.c
@@ -36,7 +36,7 @@ check_elf (const char *fname, int class, int use_mmap)
{
printf ("\nfname: %s\n", fname);
- int fd = open (fname, O_RDWR | O_CREAT | O_TRUNC, 0666);
+ int fd = open (fname, O_RDWR | O_BINARY | O_CREAT | O_TRUNC, 0666);
if (fd == -1)
{
printf ("cannot open `%s': %s\n", fname, strerror (errno));
@@ -124,7 +124,7 @@ check_elf (const char *fname, int class, int use_mmap)
close (fd);
/* Reread the ELF from disk now. */
- fd = open (fname, O_RDONLY, 0666);
+ fd = open (fname, O_RDONLY | O_BINARY, 0666);
if (fd == -1)
{
printf ("cannot open `%s' read-only: %s\n", fname, strerror (errno));