unistd.h isn't guaranteed to exist when the target isn't Windows, in particular if the target is bare-metal (i.e. no operating system). Handle this by using __has_include instead, though in filesystem/operations.cpp we already unconditionally include it so just remove the extra include.
- Group Reviewers
- rG4d25f4453d60: [libc++] Adjust how we guard the inclusion of unistd.h
|1556 ↗||(On Diff #263423)|
Because I didn't know about it. Looks like all the compiler version we support (in llvm/cmake/modules/CheckCompilerVersion.cmake) implement it, so it makes sense to use it.