diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /app-pda/pilot-link/files/pilot-link-0.12.3-libusb-compat-usb_open.patch |
reinit the tree, so we can have metadata
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; + |