[libc-commits] [libc] [libc][NFC] Fix GCC build in __futex_word.h (PR #192078)
via libc-commits
libc-commits at lists.llvm.org
Tue Apr 14 08:54:59 PDT 2026
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libc
Author: Jeff Bailey (kaladron)
<details>
<summary>Changes</summary>
Included __llvm-libc-common.h in __futex_word.h to fix a build failure with GCC.
GCC in C++ mode does not recognize _Alignas without the mapping to alignas provided in __llvm-libc-common.h.
The failure was introduced in commit 91c0fdfe1392.
---
Full diff: https://github.com/llvm/llvm-project/pull/192078.diff
1 Files Affected:
- (modified) libc/include/llvm-libc-types/__futex_word.h (+2)
``````````diff
diff --git a/libc/include/llvm-libc-types/__futex_word.h b/libc/include/llvm-libc-types/__futex_word.h
index 04023c7e2d5ff..302984a8867dd 100644
--- a/libc/include/llvm-libc-types/__futex_word.h
+++ b/libc/include/llvm-libc-types/__futex_word.h
@@ -9,6 +9,8 @@
#ifndef LLVM_LIBC_TYPES___FUTEX_WORD_H
#define LLVM_LIBC_TYPES___FUTEX_WORD_H
+#include "__llvm-libc-common.h"
+
typedef struct {
// Futex word should be aligned appropriately to allow target atomic
// instructions. This declaration mimics the internal setup.
``````````
</details>
https://github.com/llvm/llvm-project/pull/192078
More information about the libc-commits
mailing list