--- ../libusb-0.1.12-orig/linux.c 2006-03-04 11:52:46 +0900 +++ linux.c 2007-12-26 13:20:43 +0900 @@ -219,7 +219,7 @@ restart: waiting = 1; context = NULL; - while (!urb.usercontext && ((ret = ioctl(dev->fd, IOCTL_USB_REAPURBNDELAY, &context)) == -1) && waiting) { + while (!urb.usercontext && ((ret = ioctl(dev->fd, IOCTL_USB_REAPURBNDELAY, &context)) == -1) && errno == EAGAIN && waiting) { tv.tv_sec = 0; tv.tv_usec = 1000; // 1 msec select(dev->fd + 1, NULL, &writefds, NULL, &tv); //sub second wait