commit e4cb0183985688c375e30e36832f49c17506c513
parent 7fe04c614ad59d6cfb16efa1ede4228ce5bdca92
Author: erai <erai@omiltem.net>
Date: Mon, 3 Jun 2024 00:40:57 -0400
accept with args
Diffstat:
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/syscall.c b/syscall.c
@@ -6,6 +6,9 @@ enum {
O_RDWR = 2,
O_CREAT = 64,
O_DIRECTORY = 0x1000,
+
+ AF_INET = 2,
+ SOCK_STREAM = 1,
}
_start(argc: int, argv: **byte, envp: **byte) {
@@ -56,8 +59,8 @@ socket(pf: int, ty: int, pc: int): int {
return syscall(41, pf, ty, pc, 0, 0, 0);
}
-accept(fd: int): int {
- return syscall(43, fd, 0, 0, 0, 0, 0);
+accept(fd: int, addr: *byte, len: *int): int {
+ return syscall(43, fd, addr:int, len:int, 0, 0, 0);
}
bind(fd: int, addr: *byte, len: int): int {