Kernel/LibC: Add SYS_SOCKET

This commit is contained in:
2024-02-01 23:39:09 +02:00
parent 99eed9c37a
commit cf28ecd5a6
8 changed files with 57 additions and 0 deletions

View File

@@ -19,6 +19,7 @@ set(LIBC_SOURCES
strings.cpp
sys/banan-os.cpp
sys/mman.cpp
sys/socket.cpp
sys/stat.cpp
sys/wait.cpp
termios.cpp

View File

@@ -63,6 +63,7 @@ __BEGIN_DECLS
#define SYS_PREAD 62
#define SYS_CHOWN 63
#define SYS_LOAD_KEYMAP 64
#define SYS_SOCKET 65
__END_DECLS

8
libc/sys/socket.cpp Normal file
View File

@@ -0,0 +1,8 @@
#include <sys/socket.h>
#include <sys/syscall.h>
#include <unistd.h>
int socket(int domain, int type, int protocol)
{
return syscall(SYS_SOCKET, domain, type, protocol);
}