summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libusb/os/linux_usbfs.c8
-rw-r--r--libusb/version_nano.h2
2 files changed, 9 insertions, 1 deletions
diff --git a/libusb/os/linux_usbfs.c b/libusb/os/linux_usbfs.c
index 9d9d00e..5164616 100644
--- a/libusb/os/linux_usbfs.c
+++ b/libusb/os/linux_usbfs.c
@@ -307,6 +307,14 @@ static const char *find_usbfs_path(void)
}
}
+/* On udev based systems without any usb-devices /dev/bus/usb will not
+ * exist. So if we've not found anything and we're using udev for hotplug
+ * simply assume /dev/bus/usb rather then making libusb_init fail. */
+#if defined(USE_UDEV)
+ if (ret == NULL)
+ ret = "/dev/bus/usb";
+#endif
+
if (ret != NULL)
usbi_dbg("found usbfs at %s", ret);
diff --git a/libusb/version_nano.h b/libusb/version_nano.h
index 74cfbd2..7b92667 100644
--- a/libusb/version_nano.h
+++ b/libusb/version_nano.h
@@ -1 +1 @@
-#define LIBUSB_NANO 10993
+#define LIBUSB_NANO 10994