Browse Source

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>
tags/n2.1
Derek Buitenhuis Michael Niedermayer 11 years ago
parent
commit
87e8cbf709
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      libavutil/file.c

+ 3
- 0
libavutil/file.c 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;
}



Loading…
Cancel
Save