[libc-commits] [libc] [libc] Create socketcall helper for Linux syscall wrappers (PR #196903)
Jeff Bailey via libc-commits
libc-commits at lists.llvm.org
Mon May 11 05:25:34 PDT 2026
================
@@ -23,14 +23,9 @@ LLVM_LIBC_FUNCTION(int, bind,
(int socket, const struct sockaddr *address,
socklen_t address_len)) {
#ifdef SYS_bind
- int ret =
- LIBC_NAMESPACE::syscall_impl<int>(SYS_bind, socket, address, address_len);
+ int ret = syscall_impl<int>(SYS_bind, socket, address, address_len);
#elif defined(SYS_socketcall)
- unsigned long sockcall_args[3] = {static_cast<unsigned long>(socket),
- reinterpret_cast<unsigned long>(address),
- static_cast<unsigned long>(address_len)};
- int ret = LIBC_NAMESPACE::syscall_impl<int>(SYS_socketcall, SYS_BIND,
- sockcall_args);
+ int ret = socketcall(SYS_BIND, socket, address, address_len);
----------------
kaladron wrote:
This (and at least 2 other sites) look to be missing the return specialisation, is that not needed? Also, I suspect that they need linux_syscalls::
https://github.com/llvm/llvm-project/pull/196903
More information about the libc-commits
mailing list