diff options
author | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2013-08-08 03:44:37 +0400 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2013-08-08 12:07:51 +0400 |
commit | 0f1fb6c0194c85483dedb93b20a5b76f6fc9d520 (patch) | |
tree | de1fd4bdf2de8b84365cc514d5f5e30bad6946b9 /libavutil | |
parent | e8edf4e1cf6051802ad717dcf8a454d4661929af (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')
-rw-r--r-- | libavutil/file.c | 3 |
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; } |