8 int ioctl(int fd, int req, ...)
13 arg = va_arg(ap, void *);
15 int r = __syscall(SYS_ioctl, fd, req, arg);
16 if (r==-ENOTTY) switch (req) {
19 if (SIOCGSTAMP==SIOCGSTAMP_OLD) break;
20 if (req==SIOCGSTAMP) req=SIOCGSTAMP_OLD;
21 if (req==SIOCGSTAMPNS) req=SIOCGSTAMPNS_OLD;
23 r = __syscall(SYS_ioctl, fd, req, t32);
25 if (req==SIOCGSTAMP_OLD) {
26 struct timeval *tv = arg;
30 struct timespec *ts = arg;
35 return __syscall_ret(r);