From: Derek Buitenhuis Date: Wed, 7 Aug 2013 23:44:37 +0000 (-0400) Subject: libavutil: Don't use fcntl if the function does not exist X-Git-Tag: n2.1~57^2~502 X-Git-Url: http://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff_plain/0f1fb6c0194c85483dedb93b20a5b76f6fc9d520 libavutil: Don't use fcntl if the function does not exist Not all platforms have the function. Signed-off-by: Derek Buitenhuis Signed-off-by: Martin Storsjö --- 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; }