Kernel/LibC: Add SYS_SOCKET
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
8
libc/sys/socket.cpp
Normal 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);
|
||||
}
|
||||
Reference in New Issue
Block a user