mirror of
https://github.com/intel/llvm.git
synced 2026-01-22 23:49:22 +08:00
[libc++abi] Guard include of <unistd.h> behind __has_include
This doesn't change anything on platforms that have <unistd.h>, but it will allow this file to compile on platforms that do not.
This commit is contained in:
@@ -39,11 +39,13 @@
|
||||
|
||||
#include "__cxxabi_config.h"
|
||||
#include "include/atomic_support.h" // from libc++
|
||||
#include <unistd.h>
|
||||
#if defined(__has_include)
|
||||
# if __has_include(<sys/syscall.h>)
|
||||
# include <sys/syscall.h>
|
||||
# endif
|
||||
# if __has_include(<unistd.h>)
|
||||
# include <unistd.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
Reference in New Issue
Block a user