diff options
Diffstat (limited to 'app-pda/pilot-link/files/pilot-link-0.12.3-libusb-compat-usb_open.patch')
-rw-r--r-- | app-pda/pilot-link/files/pilot-link-0.12.3-libusb-compat-usb_open.patch | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/app-pda/pilot-link/files/pilot-link-0.12.3-libusb-compat-usb_open.patch b/app-pda/pilot-link/files/pilot-link-0.12.3-libusb-compat-usb_open.patch new file mode 100644 index 000000000000..3f580c5af1e1 --- /dev/null +++ b/app-pda/pilot-link/files/pilot-link-0.12.3-libusb-compat-usb_open.patch @@ -0,0 +1,21 @@ +With libusb-compat, usb_open() calls must be checked for their return value, as +NULL is now returned on failure. + +Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> + +diff -Nuar pilot-link-0.12.3.orig/libpisock/libusb.c pilot-link-0.12.3/libpisock/libusb.c +--- pilot-link-0.12.3.orig/libpisock/libusb.c 2007-02-09 08:06:22.000000000 -0800 ++++ pilot-link-0.12.3/libpisock/libusb.c 2009-05-18 17:32:16.316895284 -0700 +@@ -141,6 +141,12 @@ + + LOG((PI_DBG_DEV, PI_DBG_LVL_DEBUG, "%s: USB_handle=%p\n", + __FILE__, USB_handle)); ++ ++ if(USB_handle == NULL) { ++ LOG((PI_DBG_DEV, PI_DBG_LVL_DEBUG, "%s: Unable to open device.\n", ++ __FILE__)); ++ continue; ++ } + + data->ref = USB_handle; + |