Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerek Buitenhuis <derek.buitenhuis@gmail.com>2013-08-08 03:44:37 +0400
committerMartin Storsjö <martin@martin.st>2013-08-08 12:07:51 +0400
commit0f1fb6c0194c85483dedb93b20a5b76f6fc9d520 (patch)
treede1fd4bdf2de8b84365cc514d5f5e30bad6946b9 /libavutil/file.c
parente8edf4e1cf6051802ad717dcf8a454d4661929af (diff)
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/file.c')
-rw-r--r--libavutil/file.c3
1 files changed, 3 insertions, 0 deletions
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;
}