diff options
author | Ian Moffett <ian@osmora.org> | 2024-03-07 17:28:00 -0500 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2024-03-07 17:28:32 -0500 |
commit | bd5969fc876a10b18613302db7087ef3c40f18e1 (patch) | |
tree | 7c2b8619afe902abf99570df2873fbdf40a4d1a1 /lib/mlibc/options/glibc/include/sys/ioctl.h | |
parent | a95b38b1b92b172e6cc4e8e56a88a30cc65907b0 (diff) |
lib: Add mlibc
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'lib/mlibc/options/glibc/include/sys/ioctl.h')
-rw-r--r-- | lib/mlibc/options/glibc/include/sys/ioctl.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/lib/mlibc/options/glibc/include/sys/ioctl.h b/lib/mlibc/options/glibc/include/sys/ioctl.h new file mode 100644 index 0000000..6121446 --- /dev/null +++ b/lib/mlibc/options/glibc/include/sys/ioctl.h @@ -0,0 +1,44 @@ +#ifndef _SYS_IOCTL_H +#define _SYS_IOCTL_H + +#include <mlibc-config.h> +#include <abi-bits/ioctls.h> + +// On Linux, sys/ioctl.h includes the termios ioctls. +#if __MLIBC_LINUX_OPTION +# include <asm/ioctls.h> +# include <bits/winsize.h> +# include <sys/ttydefaults.h> +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __MLIBC_ABI_ONLY + +int ioctl(int fd, unsigned long request, ...); + +#endif /* !__MLIBC_ABI_ONLY */ + +#define FIONREAD 0x541B +#define FIONBIO 0x5421 +#define FIONCLEX 0x5450 +#define FIOCLEX 0x5451 + +#define SIOCGIFNAME 0x8910 +#define SIOCGIFCONF 0x8912 +#define SIOCGIFFLAGS 0x8913 +#define SIOCSIFFLAGS 0x8914 +#define SIOCGIFMTU 0x8921 +#define SIOCSIFMTU 0x8922 +#define SIOCGIFINDEX 0x8933 + +#define SIOCPROTOPRIVATE 0x89E0 +#define SIOCDEVPRIVATE 0x89F0 + +#ifdef __cplusplus +} +#endif + +#endif // _SYS_IOCTL_H |