fix(userspace/libc): fix wrong implementation of ioctl()

Signed-off-by: EnderIce2 <enderice2@protonmail.com>
This commit is contained in:
EnderIce2 2025-03-05 18:54:18 +00:00
parent 9da2650486
commit 42b8b6895f
No known key found for this signature in database
GPG Key ID: 2EE20AF089811A5A

View File

@ -22,9 +22,11 @@
export int ioctl(int fd, unsigned long op, ...)
{
void *arg;
va_list args;
va_start(args, op);
int ret = call_ioctl(fd, op, args);
arg = va_arg(args, void *);
va_end(args);
int ret = call_ioctl(fd, op, arg);
return __check_errno(ret, -1);
}