[FFmpeg-cvslog] libavutil: Don't use fcntl if the function does not exist
Derek Buitenhuis
git at videolan.org
Thu Aug 8 11:15:42 CEST 2013
ffmpeg | branch: master | Derek Buitenhuis <derek.buitenhuis at gmail.com> | Wed Aug 7 19:44:37 2013 -0400| [87e8cbf70931b789efc04c978082fc5181a51a26] | committer: Michael Niedermayer
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=87e8cbf70931b789efc04c978082fc5181a51a26
---
libavutil/file.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavutil/file.c b/libavutil/file.c
index 33dcb78..8d03534 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