[FFmpeg-cvslog] libavutil: Don't use fcntl if the function does not exist
Derek Buitenhuis
git at videolan.org
Thu Aug 8 12:02:53 CEST 2013
ffmpeg | branch: master | Derek Buitenhuis <derek.buitenhuis at gmail.com> | Wed Aug 7 19:44:37 2013 -0400| [0f1fb6c0194c85483dedb93b20a5b76f6fc9d520] | committer: Martin Storsjö
libavutil: Don't use fcntl if the function does not exist
Not all platforms have the function.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis at gmail.com>
Signed-off-by: Martin Storsjö <martin at martin.st>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0f1fb6c0194c85483dedb93b20a5b76f6fc9d520
---
libavutil/file.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavutil/file.c b/libavutil/file.c
index add049d..9ce0dc5 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;
}
More information about the ffmpeg-cvslog
mailing list