Commit 87e8cbf7 authored by Derek Buitenhuis's avatar Derek Buitenhuis Committed by Michael Niedermayer

libavutil: Don't use fcntl if the function does not exist

Not all platforms have the function.
Signed-off-by: 's avatarDerek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: 's avatarMartin Storsjö <martin@martin.st>
parent 5f38317e
...@@ -52,8 +52,11 @@ int avpriv_open(const char *filename, int flags, ...) ...@@ -52,8 +52,11 @@ int avpriv_open(const char *filename, int flags, ...)
#endif #endif
fd = open(filename, flags, mode); fd = open(filename, flags, mode);
#if HAVE_FCNTL
if (fd != -1) if (fd != -1)
fcntl(fd, F_SETFD, FD_CLOEXEC); fcntl(fd, F_SETFD, FD_CLOEXEC);
#endif
return fd; return fd;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment