This commit is contained in:
KillTheMule
2016-04-23 23:00:59 +02:00
parent 445f0d7eed
commit 23e8d6d94b
4 changed files with 17 additions and 11 deletions

View File

@@ -2373,8 +2373,9 @@ static FILE *fopen_noinh_readbin(char *filename)
# ifdef HAVE_FD_CLOEXEC
{
int fdflags = fcntl(fd_tmp, F_GETFD);
if (fdflags >= 0 && (fdflags & FD_CLOEXEC) == 0)
if (fdflags >= 0 && (fdflags & FD_CLOEXEC) == 0) {
(void)fcntl(fd_tmp, F_SETFD, fdflags | FD_CLOEXEC);
}
}
# endif