Browse Source

lavu/file: include unistd.h only when available

The unistd.h header is only needed for the close() declaration.
If this header is not available, the close() declaration may be
provided by another header, e.g. io.h.

Signed-off-by: Mans Rullgard <mans@mansr.com>
tags/n1.0
Mans Rullgard 13 years ago
parent
commit
d11baad055
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      libavutil/file.c

+ 2
- 0
libavutil/file.c View File

@@ -20,7 +20,9 @@
#include "log.h"
#include <fcntl.h>
#include <sys/stat.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#if HAVE_MMAP
#include <sys/mman.h>
#elif HAVE_MAPVIEWOFFILE


Loading…
Cancel
Save