diff options
author | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2013-08-07 19:44:37 -0400 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2013-08-08 11:07:51 +0300 |
commit | 0f1fb6c0194c85483dedb93b20a5b76f6fc9d520 (patch) | |
tree | de1fd4bdf2de8b84365cc514d5f5e30bad6946b9 | |
parent | e8edf4e1cf6051802ad717dcf8a454d4661929af (diff) | |
download | ffmpeg-0f1fb6c0194c85483dedb93b20a5b76f6fc9d520.tar.gz |
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>
-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; } |