[libc-commits] [libc] [libc][NFC] Fix GCC build in __futex_word.h (PR #192078)
Jeff Bailey via libc-commits
libc-commits at lists.llvm.org
Tue Apr 14 08:53:12 PDT 2026
https://github.com/kaladron created https://github.com/llvm/llvm-project/pull/192078
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.
>From fda7169ad4c7affe8d86ef6342f6e43ab01faf72 Mon Sep 17 00:00:00 2001
From: Jeff Bailey <jbailey at raspberryginger.com>
Date: Tue, 14 Apr 2026 16:46:13 +0100
Subject: [PATCH] [libc][NFC] Fix GCC build in __futex_word.h
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.
---
libc/include/llvm-libc-types/__futex_word.h | 2 ++
1 file changed, 2 insertions(+)
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.
More information about the libc-commits
mailing list