[all-commits] [llvm/llvm-project] fef23e: [libc++] Include "bits/alltypes.h" to provide mbst...

pzhengqc via All-commits all-commits at lists.llvm.org
Tue May 30 17:59:55 PDT 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: fef23e8d871add8d885d335e4586a9fa420c1171
  Author: Pengxuan Zheng <pzheng at quicinc.com>
  Date:   2023-05-30 (Tue, 30 May 2023)

  Changed paths:
    M libcxx/include/__mbstate_t.h

  Log Message:
  [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.

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

More information about the All-commits mailing list