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.
Unified · Split
| @@ -20,7 +20,9 @@ · 19 unmodified lines | |||
| 20 | #include "log.h" | 20 | #include "log.h" |
| 21 | #include <fcntl.h> | 21 | #include <fcntl.h> |
| 22 | #include <sys/stat.h> | 22 | #include <sys/stat.h> |
| 23 | #if HAVE_UNISTD_H | ||
| 23 | #include <unistd.h> | 24 | #include <unistd.h> |
| 25 | #endif | ||
| 24 | #if HAVE_MMAP | 26 | #if HAVE_MMAP |
| 25 | #include <sys/mman.h> | 27 | #include <sys/mman.h> |
| 26 | #elif HAVE_MAPVIEWOFFILE | 28 | #elif HAVE_MAPVIEWOFFILE |