aboutsummaryrefslogtreecommitdiff
path: root/elf/dl-misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'elf/dl-misc.c')
-rw-r--r--elf/dl-misc.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/elf/dl-misc.c b/elf/dl-misc.c
index 1e9a6ee..c5d3e0e 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)