From 87e8cbf70931b789efc04c978082fc5181a51a26 Mon Sep 17 00:00:00 2001 From: Derek Buitenhuis Date: Wed, 7 Aug 2013 19:44:37 -0400 Subject: [PATCH] libavutil: Don't use fcntl if the function does not exist MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Not all platforms have the function. Signed-off-by: Derek Buitenhuis Signed-off-by: Martin Storsjö --- libavutil/file.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavutil/file.c b/libavutil/file.c index 33dcb7864f..8d035347f2 100644 --- a/libavutil/file.c +++ b/libavutil/file.c @@ -52,8 +52,11 @@ int avpriv_open(const char *filename, int flags, ...) #endif fd = open(filename, flags, mode); +#if HAVE_FCNTL if (fd != -1) fcntl(fd, F_SETFD, FD_CLOEXEC); +#endif + return fd; }