openbsd-ports/devel/mspdebug/patches/patch-rf2500_c
jasper 5b904ba60b - update mspdebug to 0.13
- remove support for Olimex MSP430-JTAG-ISO which requires a linux-only ioctl.
2010-12-02 18:41:46 +00:00

30 lines
817 B
Plaintext

$OpenBSD: patch-rf2500_c,v 1.3 2010/12/02 18:41:46 jasper Exp $
- usb_bulk_read() returns 0 on timeout, not -1
--- rf2500.c.orig Mon Nov 8 22:40:57 2010
+++ rf2500.c Thu Dec 2 13:31:01 2010
@@ -67,7 +67,7 @@ static int open_interface(struct rf2500_transport *tr,
return -1;
}
-#if !(defined(__APPLE__) || defined(WIN32))
+#if defined (__linux__)
if (usb_detach_kernel_driver_np(tr->handle, tr->int_number) < 0)
pr_error("rf2500: warning: can't "
"detach kernel driver");
@@ -221,8 +221,12 @@ transport_t rf2500_open(const char *devpath)
#ifndef __APPLE__
while (usb_bulk_read(tr->handle, USB_FET_IN_EP,
buf, sizeof(buf),
+#if defined(__OpenBSD__)
+ 100) > 0);
+#else
100) >= 0);
-#endif
+#endif /* __OpenBSD__ */
+#endif /* !__APPLE__ */
return (transport_t)tr;
}