mirror of
https://review.haiku-os.org/haiku
synced 2024-11-23 07:18:40 +01:00
unistd.h: Add cast to (void*) for first argument in C mode.
Otherwise things that pass integers could error out. Spotted by Clang.
This commit is contained in:
parent
807888c1b2
commit
c4497fa258
@ -359,15 +359,16 @@ 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){ c })
|
||||
#define ioctl(a, b, c...) __ioctl(a, b, (struct ioctl_args){ (void*)c })
|
||||
#endif
|
||||
#else
|
||||
inline int
|
||||
|
Loading…
Reference in New Issue
Block a user