From 0f1fb6c0194c85483dedb93b20a5b76f6fc9d520 Mon Sep 17 00:00:00 2001 From: Derek Buitenhuis Date: Wed, 7 Aug 2013 19:44:37 -0400 Subject: 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(+) (limited to 'libavutil') diff --git a/libavutil/file.c b/libavutil/file.c index add049d24b..9ce0dc5e01 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; } -- cgit v1.2.3