1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 17:37:37 +00:00

Stub out a bunch more functions to get closer to that sweet bash build.

This commit is contained in:
Andreas Kling 2018-11-11 10:38:33 +01:00
parent e48182d91b
commit f394e3486a
14 changed files with 114 additions and 1 deletions

17
LibC/fcntl.cpp Normal file
View file

@ -0,0 +1,17 @@
#include <errno.h>
#include <fcntl.h>
#include <stdarg.h>
#include <Kernel/Syscall.h>
extern "C" {
int fcntl(int fd, int cmd, ...)
{
va_list ap;
va_start(ap, cmd);
dword extra_arg = va_arg(ap, dword);
int rc = Syscall::invoke(Syscall::SC_fcntl, (dword)fd, (dword)cmd, extra_arg);
__RETURN_WITH_ERRNO(rc, rc, -1);
}
}