LibC: Move ioctl to <sys/ioctl.h>

Some ports seem to be assuming that ioctl exists there and not in
stropts.h
This commit is contained in:
2024-08-09 16:54:30 +03:00
parent ed325b4a45
commit 0c8cae4cc3
4 changed files with 56 additions and 42 deletions

View File

@@ -0,0 +1,14 @@
#include <stdarg.h>
#include <sys/ioctl.h>
#include <sys/syscall.h>
#include <unistd.h>
int ioctl(int fildes, int request, ...)
{
va_list args;
va_start(args, request);
void* extra = va_arg(args, void*);
va_end(args);
return syscall(SYS_IOCTL, fildes, request, extra);
}