Skip to content

Commit 6ce339e

Browse files
committed
Use LLVM libc ssize_t.h
There is no sys/types.h header in LLVM libc for baremetal targets as it is a POSIX one. ssize_t however is provided via ssize_t.h. Conditionally include this header when LLVM Libc is used as that's the reason why sys/types.h is included in the first place which is POSIX only.
1 parent cd508fc commit 6ce339e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

include/cxx.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
#include <vector>
1717
#if defined(_WIN32)
1818
#include <basetsd.h>
19+
#elif defined(__LLVM_LIBC__)
20+
#include <llvm-libc-types/ssize_t.h>
1921
#else
2022
#include <sys/types.h>
2123
#endif

0 commit comments

Comments
 (0)