| 1 |
|
| 2 | |
| 3 | * Ioctl definitions for NOLIBC
|
| 4 | * Copyright (C) 2017-2021 Willy Tarreau <[email protected]>
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 | #include "../nolibc.h"
|
| 9 |
|
| 10 | #ifndef _NOLIBC_SYS_IOCTL_H
|
| 11 | #define _NOLIBC_SYS_IOCTL_H
|
| 12 |
|
| 13 | #include "../sys.h"
|
| 14 |
|
| 15 | #include <linux/ioctl.h>
|
| 16 |
|
| 17 | |
| 18 | * int ioctl(int fd, unsigned long cmd, ... arg);
|
| 19 |
|
| 20 |
|
| 21 | static __attribute__((unused))
|
| 22 | long _sys_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg)
|
| 23 | {
|
| 24 | return __nolibc_syscall3(__NR_ioctl, fd, cmd, arg);
|
| 25 | }
|
| 26 |
|
| 27 | #define ioctl(fd, cmd, arg) __sysret(_sys_ioctl(fd, cmd, (unsigned long)(arg)))
|
| 28 |
|
| 29 | #endif
|