summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/common/ioctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps/linux/common/ioctl.c')
-rw-r--r--libc/sysdeps/linux/common/ioctl.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/libc/sysdeps/linux/common/ioctl.c b/libc/sysdeps/linux/common/ioctl.c
new file mode 100644
index 000000000..d3cc617ac
--- /dev/null
+++ b/libc/sysdeps/linux/common/ioctl.c
@@ -0,0 +1,18 @@
+#include <stdarg.h>
+#include <sys/ioctl.h>
+
+extern int __syscall_ioctl(int fd, int request, void *arg);
+
+/* powerpc has its own special version... */
+int ioctl(int fd, unsigned long int request, ...)
+{
+ void *arg;
+ va_list list;
+
+ va_start(list, request);
+ arg = va_arg(list, void *);
+
+ va_end(list);
+ return __syscall_ioctl(fd, request, arg);
+}
+