mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 17:10:23 +00:00
17 lines
342 B
C++
17 lines
342 B
C++
#include <Kernel/Syscall.h>
|
|
#include <errno.h>
|
|
#include <stdarg.h>
|
|
#include <stdio.h>
|
|
#include <sys/ioctl.h>
|
|
|
|
extern "C" {
|
|
|
|
int ioctl(int fd, unsigned request, ...)
|
|
{
|
|
va_list ap;
|
|
va_start(ap, request);
|
|
unsigned arg = va_arg(ap, unsigned);
|
|
int rc = syscall(SC_ioctl, fd, request, arg);
|
|
__RETURN_WITH_ERRNO(rc, rc, -1);
|
|
}
|
|
}
|