[libc-commits] [libc] [libc] check a few syscall #'s to avoid wrong syscalls (PR #123100)
via libc-commits
libc-commits at lists.llvm.org
Wed Jan 15 10:13:17 PST 2025
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 539b15b41a6a01017c0a555e89b7d2b62ba194d2 10ca093c1329ec0f7cd14ea611e87b7c1dca5dd0 --extensions h -- libc/src/__support/OSUtil/linux/cross_compile_clippy.h libc/startup/linux/do_start.h
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libc/src/__support/OSUtil/linux/cross_compile_clippy.h b/libc/src/__support/OSUtil/linux/cross_compile_clippy.h
index 5ae796c60a..7ddf20b5bf 100644
--- a/libc/src/__support/OSUtil/linux/cross_compile_clippy.h
+++ b/libc/src/__support/OSUtil/linux/cross_compile_clippy.h
@@ -9,13 +9,13 @@
#ifndef LLVM_LIBC_SRC___SUPPORT_OSUTIL_LINUX_CROSS_COMPILE_CLIPPY_H
#define LLVM_LIBC_SRC___SUPPORT_OSUTIL_LINUX_CROSS_COMPILE_CLIPPY_H
-
#include "src/__support/macros/properties/architectures.h"
#include <sys/syscall.h>
-#define MSG "Looks like you may be using the host kernel headers to cross " \
- "compile. This is bad because the syscall numbers frequently (but not " \
- "always) differ between architectures. What frequently happens as a " \
+#define MSG \
+ "Looks like you may be using the host kernel headers to cross " \
+ "compile. This is bad because the syscall numbers frequently (but not " \
+ "always) differ between architectures. What frequently happens as a " \
"result are crashes in startup."
// https://github.com/hrw/syscalls-table is super helpful for trying to find
@@ -41,5 +41,4 @@ static_assert(__NR_riscv_flush_icache == 259, MSG);
#error "Missing cross compile check for new arch"
#endif
-
#endif // LLVM_LIBC_SRC___SUPPORT_OSUTIL_LINUX_CROSS_COMPILE_CLIPPY_H
``````````
</details>
https://github.com/llvm/llvm-project/pull/123100
More information about the libc-commits
mailing list