Skip to content

Commit 8b4c14b

Browse files
committed
stdlib: conditionalise unistd.h
unistd.h is the standard Unix header. The standard library may be built for Windows, which is not a Unix. Guard the inclusion.
1 parent 908ce05 commit 8b4c14b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

stdlib/public/stubs/LibcShims.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@
2323

2424
#include <stdio.h>
2525
#include <sys/types.h>
26+
#if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__))
2627
#include <unistd.h>
28+
#endif
2729

2830
#include <type_traits>
2931

0 commit comments

Comments
 (0)