Skip to content

[libc] Fix accidental LIBC_NAMESPACE_syscall definition #69548

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion libc/src/unistd/linux/syscall.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

namespace LIBC_NAMESPACE {

LLVM_LIBC_FUNCTION(long, LIBC_NAMESPACE_syscall,
LLVM_LIBC_FUNCTION(long, __llvm_libc_syscall,
(long number, long arg1, long arg2, long arg3, long arg4,
long arg5, long arg6)) {
long ret = LIBC_NAMESPACE::syscall_impl<long>(number, arg1, arg2, arg3, arg4,
Expand Down
4 changes: 2 additions & 2 deletions libc/src/unistd/syscall.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

namespace LIBC_NAMESPACE {

long LIBC_NAMESPACE_syscall(long number, long arg1, long arg2, long arg3,
long arg4, long arg5, long arg6);
long __llvm_libc_syscall(long number, long arg1, long arg2, long arg3,
long arg4, long arg5, long arg6);

} // namespace LIBC_NAMESPACE

Expand Down
2 changes: 1 addition & 1 deletion libc/test/src/unistd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ add_libc_unittest(
libc.include.unistd
libc.include.fcntl
libc.include.sys_syscall
libc.src.unistd.LIBC_NAMESPACE_syscall
libc.src.unistd.__llvm_libc_syscall
libc.test.errno_setter_matcher
)

Expand Down
2 changes: 1 addition & 1 deletion libc/test/src/unistd/syscall_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ using LIBC_NAMESPACE::testing::ErrnoSetterMatcher::Succeeds;
// There is no function named "syscall" in llvm-libc, we instead use a macro to
// set up the arguments properly. We still need to specify the namespace though
// because the macro generates a call to the actual internal function
// (LIBC_NAMESPACE_syscall) which is inside the namespace.
// (__llvm_libc_syscall) which is inside the namespace.
TEST(LlvmLibcSyscallTest, TrivialCall) {
libc_errno = 0;

Expand Down