[vlc-commits] posix: rely on F_DUPFD_CLOEXEC
Rémi Denis-Courmont
git at videolan.org
Sat Sep 21 11:49:04 CEST 2019
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Sep 21 11:57:19 2019 +0300| [95041019b09a5ecd8c5343721a136b349590be92] | committer: Rémi Denis-Courmont
posix: rely on F_DUPFD_CLOEXEC
This was added in POSIX.2008 and thus missing on MacOS < 10.7.
But those old versions are no longer supported since VLC 3.0.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=95041019b09a5ecd8c5343721a136b349590be92
---
src/posix/filesystem.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/src/posix/filesystem.c b/src/posix/filesystem.c
index 2ac9c1187e..0ba1a37957 100644
--- a/src/posix/filesystem.c
+++ b/src/posix/filesystem.c
@@ -185,14 +185,7 @@ char *vlc_getcwd (void)
int vlc_dup (int oldfd)
{
-#ifdef F_DUPFD_CLOEXEC
return fcntl (oldfd, F_DUPFD_CLOEXEC, 0);
-#else
- int newfd = dup (oldfd);
- if (newfd != -1)
- vlc_cloexec(oldfd);
- return newfd;
-#endif
}
int vlc_pipe (int fds[2])
More information about the vlc-commits
mailing list