diff options
Diffstat (limited to 'elf')
-rw-r--r-- | elf/dl-misc.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/elf/dl-misc.c b/elf/dl-misc.c index 1e9a6ee560..c5d3e0e7c5 100644 --- a/elf/dl-misc.c +++ b/elf/dl-misc.c @@ -45,11 +45,7 @@ _dl_sysdep_read_whole_file (const char *file, size_t *sizep, int prot) { void *result = MAP_FAILED; struct stat64 st; - int flags = O_RDONLY; -#ifdef O_CLOEXEC - flags |= O_CLOEXEC; -#endif - int fd = __open (file, flags); + int fd = __open (file, O_RDONLY | O_CLOEXEC); if (fd >= 0) { if (__fxstat64 (_STAT_VER, fd, &st) >= 0) |