1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-30 22:43:12 +03:00

Assume that O_CLOEXEC is always defined and works

This commit is contained in:
Florian Weimer
2017-04-18 14:56:51 +02:00
parent b48061e1a5
commit cef9b65376
27 changed files with 91 additions and 565 deletions

View File

@ -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)