[libc-commits] [libc] [libc] Fix sigset_t type definition (PR #123277)
Roland McGrath via libc-commits
libc-commits at lists.llvm.org
Thu Jan 16 19:36:41 PST 2025
https://github.com/frobtech created https://github.com/llvm/llvm-project/pull/123277
The libc headers are C, not C++.
>From 588356ca9f6235b33023a4d909fdf7706f4bc3e8 Mon Sep 17 00:00:00 2001
From: Roland McGrath <mcgrathr at google.com>
Date: Thu, 16 Jan 2025 19:34:45 -0800
Subject: [PATCH] [libc] Fix sigset_t type definition
The libc headers are C, not C++.
---
libc/include/llvm-libc-types/sigset_t.h | 4 ++--
libc/include/llvm-libc-types/struct_sigaction.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/libc/include/llvm-libc-types/sigset_t.h b/libc/include/llvm-libc-types/sigset_t.h
index 1f601488db4c39..8c4d3b49533db9 100644
--- a/libc/include/llvm-libc-types/sigset_t.h
+++ b/libc/include/llvm-libc-types/sigset_t.h
@@ -13,8 +13,8 @@
// This definition can be adjusted/specialized for different targets and
// platforms as necessary. This definition works for Linux on most targets.
-struct sigset_t {
+typedef struct {
unsigned long __signals[__NSIGSET_WORDS];
-};
+} sigset_t;
#endif // LLVM_LIBC_TYPES_SIGSET_T_H
diff --git a/libc/include/llvm-libc-types/struct_sigaction.h b/libc/include/llvm-libc-types/struct_sigaction.h
index 4257cfecd643a4..b4d0c965a4c633 100644
--- a/libc/include/llvm-libc-types/struct_sigaction.h
+++ b/libc/include/llvm-libc-types/struct_sigaction.h
@@ -17,7 +17,7 @@ struct sigaction {
void (*sa_handler)(int);
void (*sa_sigaction)(int, siginfo_t *, void *);
};
- struct sigset_t sa_mask;
+ sigset_t sa_mask;
int sa_flags;
#ifdef __linux__
// This field is present on linux for most targets.
More information about the libc-commits
mailing list