aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil
diff options
context:
space:
mode:
authorDerek Buitenhuis <derek.buitenhuis@gmail.com>2013-08-07 19:44:37 -0400
committerMichael Niedermayer <michaelni@gmx.at>2013-08-08 11:10:33 +0200
commit87e8cbf70931b789efc04c978082fc5181a51a26 (patch)
tree05ed7ee62983f68e1706412d22114186879af4bc /libavutil
parent5f38317e59bdea80e2bb66389b250b985344ebdc (diff)
downloadffmpeg-87e8cbf70931b789efc04c978082fc5181a51a26.tar.gz
libavutil: Don't use fcntl if the function does not exist
Not all platforms have the function. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com> Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavutil')
-rw-r--r--libavutil/file.c3
1 files changed, 3 insertions, 0 deletions
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;
}