Revert "unistd.h: Add cast to (void*) for first argument in C mode."
This reverts commit c4497fa258.
Breaks 2-argument ioctl, it seems.
This commit is contained in:
@@ -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 ftruncate(int fd, off_t newSize);
|
||||||
extern int truncate(const char *path, off_t newSize);
|
extern int truncate(const char *path, off_t newSize);
|
||||||
|
|
||||||
struct ioctl_args {
|
struct ioctl_args {
|
||||||
void* argument;
|
void* argument;
|
||||||
size_t size;
|
size_t size;
|
||||||
};
|
};
|
||||||
int __ioctl(int fd, ulong cmd, struct ioctl_args args);
|
int __ioctl(int fd, ulong cmd, struct ioctl_args args);
|
||||||
#ifndef __cplusplus
|
#ifndef __cplusplus
|
||||||
extern int ioctl(int fd, unsigned long op, ...);
|
extern int ioctl(int fd, unsigned long op, ...);
|
||||||
#ifndef _KERNEL_MODE
|
#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
|
#endif
|
||||||
#else
|
#else
|
||||||
inline int
|
inline int
|
||||||
|
|||||||
Reference in New Issue
Block a user