Skip to content

Commit 45b1a4b

Browse files
authored
Add <stdbool.h> to llvm-libc-types headers that need it. (#165798)
We need `<stdbool.h>` to support having "bool" members inside pthread structs that may get included through `<pthread.h>` from C code prior to C23.
1 parent 1099d28 commit 45b1a4b

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

libc/include/llvm-libc-types/__barrier_type.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
#ifndef LLVM_LIBC_TYPES__BARRIER_TYPE_H
1010
#define LLVM_LIBC_TYPES__BARRIER_TYPE_H
1111

12+
#include <stdbool.h>
13+
1214
typedef struct __attribute__((aligned(8 /* alignof (Barrier) */))) {
1315
unsigned expected;
1416
unsigned waiting;

libc/include/llvm-libc-types/pthread_barrierattr_t.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
#ifndef LLVM_LIBC_TYPES_PTHREAD_BARRIERATTR_T_H
1010
#define LLVM_LIBC_TYPES_PTHREAD_BARRIERATTR_T_H
1111

12+
#include <stdbool.h>
13+
1214
typedef struct {
1315
bool pshared;
1416
} pthread_barrierattr_t;

0 commit comments

Comments
 (0)