[libc-commits] [libc] [libc] Fix sigset_t type definition (PR #123277)
via libc-commits
libc-commits at lists.llvm.org
Thu Jan 16 19:37:31 PST 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libc
Author: Roland McGrath (frobtech)
<details>
<summary>Changes</summary>
The libc headers are C, not C++.
---
Full diff: https://github.com/llvm/llvm-project/pull/123277.diff
2 Files Affected:
- (modified) libc/include/llvm-libc-types/sigset_t.h (+2-2)
- (modified) libc/include/llvm-libc-types/struct_sigaction.h (+1-1)
``````````diff
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.
``````````
</details>
https://github.com/llvm/llvm-project/pull/123277
More information about the libc-commits
mailing list