Skip to content
Commit fef23e8d authored by Pengxuan Zheng's avatar Pengxuan Zheng
Browse files

[libc++] Include "bits/alltypes.h" to provide mbstate_t when using musl libc

With D148542, we ran into the following libc++ build error when using musl libc.

```
.../musl/include/bits/alltypes.h:354:16:
error: definition of type '__mbstate_t' conflicts with typedef of the same name
typedef struct __mbstate_t { unsigned __opaque1, __opaque2; } mbstate_t;
               ^
.../sysroot/usr/include/bits/types/__mbstate_t.h:21:3: note: '__mbstate_t' declared here
} __mbstate_t;
  ^
1 error generated.
```
This is because the mbstate_t definition in musl libc conflicts with the one
from "bits/types/mbstate_t.h", and this patch attempts to fix this build issue
when musl libc is used.

Reviewed By: iana

Differential Revision: https://reviews.llvm.org/D151740
parent 7a1077ba
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment