Added socket syscalls for Mac
This commit is contained in:
parent
ace2f3c4a5
commit
170931cf5d
3 changed files with 30 additions and 16 deletions
15
lib/sys/network_mac.q
Normal file
15
lib/sys/network_mac.q
Normal file
|
@ -0,0 +1,15 @@
|
|||
socket(family Int, type Int, protocol Int) -> Int {
|
||||
return syscall(0x2000061, family, type, protocol)
|
||||
}
|
||||
|
||||
accept(fd Int, address Pointer, length Int) -> Int {
|
||||
return syscall(0x200001E, fd, address, length)
|
||||
}
|
||||
|
||||
bind(fd Int, address Pointer, length Int) -> Int {
|
||||
return syscall(0x2000068, fd, address, length)
|
||||
}
|
||||
|
||||
listen(fd Int, backlog Int) -> Int {
|
||||
return syscall(0x200006A, fd, backlog)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue