On Thu, 8 Aug 2013, Luca Barbato wrote:
On 08/08/13 01:44, Derek Buitenhuis wrote:
Not all platforms have the function.
Signed-off-by: Derek Buitenhuis <[email protected]>
---
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
While at it maybe if HAVE_FCNTL && !defined(O_CLOEXEC)
Not really, even if you have O_CLOEXEC in the userland the kernel might
not support it - that's why it was unconditionally included in the first
place.
Will push in a moment (with the typo fixed).
// Martin
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel