Commit f995d520 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

posix: fix O_CLOEXEC flag in open/openat

(cherry picked from commit a0fbc944)
Signed-off-by: Rémi Denis-Courmont's avatarRémi Denis-Courmont <>
parent 267da9a6
......@@ -67,7 +67,7 @@ int vlc_open (const char *filename, int flags, ...)
va_end (ap);
#ifdef O_CLOEXEC
return open(filename, flags, mode | O_CLOEXEC);
return open(filename, flags | O_CLOEXEC, mode);
int fd = open(filename, flags, mode);
if (fd != -1)
......@@ -87,7 +87,7 @@ int vlc_openat (int dir, const char *filename, int flags, ...)
va_end (ap);
return openat(dir, filename, flags, mode | O_CLOEXEC);
return openat(dir, filename, flags | O_CLOEXEC, mode);
VLC_UNUSED (filename);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment