1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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>
This commit is contained in:
Derek Buitenhuis 2013-08-07 19:44:37 -04:00 committed by Michael Niedermayer
parent 5f38317e59
commit 87e8cbf709

View File

@ -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;
}