+int ioctl(int fd, int request, ...) {
+ va_list args;
+ void *argp;
+ int ret;
+
+ if (!ioctl_func)
+ ioctl_func = (int (*) (int, int, void *)) dlsym (REAL_LIBC, "ioctl");
+
+ va_start (args, request);
+ argp = va_arg (args, void *);
+ va_end (args);
+
+ if (fd == windrvrfd)
+ ret = do_wdioctl(fd, request, argp);
+ else
+ ret = (*ioctl_func) (fd, request, argp);