From 14744074dde8aba1df1a61d8dc8e45342cc0e4cc Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Tue, 5 Nov 2024 22:03:58 -0500 Subject: [PATCH] Revert "unistd.h: Add cast to (void*) for first argument in C mode." This reverts commit c4497fa25836a3993305d7640801254f54e647d0. Breaks 2-argument ioctl, it seems. --- headers/posix/unistd.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/headers/posix/unistd.h b/headers/posix/unistd.h index f67275f03b..e4427aba9c 100644 --- a/headers/posix/unistd.h +++ b/headers/posix/unistd.h @@ -361,16 +361,15 @@ extern int symlinkat(const char *toPath, int fd, const char *symlinkPath); extern int ftruncate(int fd, off_t newSize); extern int truncate(const char *path, off_t newSize); - struct ioctl_args { - void* argument; - size_t size; + void* argument; + size_t size; }; int __ioctl(int fd, ulong cmd, struct ioctl_args args); #ifndef __cplusplus extern int ioctl(int fd, unsigned long op, ...); #ifndef _KERNEL_MODE -#define ioctl(a, b, c...) __ioctl(a, b, (struct ioctl_args){ (void*)c }) +#define ioctl(a, b, c...) __ioctl(a, b, (struct ioctl_args){ c }) #endif #else inline int