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>
pull/37/head
Derek Buitenhuis 12 years ago committed by Martin Storsjö
parent e8edf4e1cf
commit 0f1fb6c019
  1. 3
      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;
}

Loading…
Cancel
Save