mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-11 18:25:03 +00:00
These types can be picked up by including <AK/Types.h>: * u8, u16, u32, u64 (unsigned) * i8, i16, i32, i64 (signed)
18 lines
323 B
C++
18 lines
323 B
C++
#include <Kernel/Syscall.h>
|
|
#include <errno.h>
|
|
#include <fcntl.h>
|
|
#include <stdarg.h>
|
|
#include <stdio.h>
|
|
|
|
extern "C" {
|
|
|
|
int fcntl(int fd, int cmd, ...)
|
|
{
|
|
va_list ap;
|
|
va_start(ap, cmd);
|
|
u32 extra_arg = va_arg(ap, u32);
|
|
int rc = syscall(SC_fcntl, fd, cmd, extra_arg);
|
|
__RETURN_WITH_ERRNO(rc, rc, -1);
|
|
}
|
|
}
|