/* * Copyright (c) 2018-2020, Andreas Kling * * SPDX-License-Identifier: BSD-2-Clause */ #include #include #include #include #include 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); va_end(ap); __RETURN_WITH_ERRNO(rc, rc, -1); } }