mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-11 01:06:01 +03:00
3904541938
Among other things this makes "less" work on x86_64.
25 lines
466 B
C++
25 lines
466 B
C++
/*
|
|
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#include <errno.h>
|
|
#include <stdarg.h>
|
|
#include <stdio.h>
|
|
#include <sys/ioctl.h>
|
|
#include <syscall.h>
|
|
|
|
extern "C" {
|
|
|
|
int ioctl(int fd, unsigned request, ...)
|
|
{
|
|
va_list ap;
|
|
va_start(ap, request);
|
|
FlatPtr arg = va_arg(ap, FlatPtr);
|
|
int rc = syscall(SC_ioctl, fd, request, arg);
|
|
va_end(ap);
|
|
__RETURN_WITH_ERRNO(rc, rc, -1);
|
|
}
|
|
}
|