[libc-commits] [libc] [libc] Implement connect(2) on linux (PR #189668)

via libc-commits libc-commits at lists.llvm.org
Tue Mar 31 07:05:29 PDT 2026


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libc

Author: Pavel Labath (labath)

<details>
<summary>Changes</summary>

I'm using the new syscall wrapper framework, and enabling the entry point for x86_64, aarch64 and riscv. The associated test currently only checks for the error code. Once we have listen&accept (which I'm probably going to tackle next), we can test that the two can talk to each other.

---
Full diff: https://github.com/llvm/llvm-project/pull/189668.diff


11 Files Affected:

- (modified) libc/config/linux/aarch64/entrypoints.txt (+1) 
- (modified) libc/config/linux/riscv/entrypoints.txt (+1) 
- (modified) libc/config/linux/x86_64/entrypoints.txt (+1) 
- (modified) libc/src/__support/OSUtil/linux/syscall_wrappers/CMakeLists.txt (+15) 
- (added) libc/src/__support/OSUtil/linux/syscall_wrappers/connect.h (+48) 
- (modified) libc/src/sys/socket/CMakeLists.txt (+7) 
- (added) libc/src/sys/socket/connect.h (+23) 
- (modified) libc/src/sys/socket/linux/CMakeLists.txt (+14) 
- (added) libc/src/sys/socket/linux/connect.cpp (+31) 
- (modified) libc/test/src/sys/socket/linux/CMakeLists.txt (+20) 
- (added) libc/test/src/sys/socket/linux/connect_test.cpp (+68) 


``````````diff
The server is unavailable at this time. Please wait a few minutes before you try again.
``````````

</details>


https://github.com/llvm/llvm-project/pull/189668


More information about the libc-commits mailing list