Added socket syscalls for Mac

This commit is contained in:
Eduard Urbach 2025-02-06 13:19:04 +01:00
parent 1b63ac73cf
commit 9908066c20
Signed by: eduard
GPG key ID: 49226B848C78F6C8
3 changed files with 30 additions and 16 deletions

15
lib/sys/network_linux.q Normal file
View file

@ -0,0 +1,15 @@
socket(family Int, type Int, protocol Int) -> Int {
return syscall(41, family, type, protocol)
}
accept(fd Int, address Pointer, length Int) -> Int {
return syscall(43, fd, address, length)
}
bind(fd Int, address Pointer, length Int) -> Int {
return syscall(49, fd, address, length)
}
listen(fd Int, backlog Int) -> Int {
return syscall(50, fd, backlog)
}