The branch, master has been updated
via e59bc450ba1b263f549185e16a00c7ab57b6c247 (commit)
from c1c70e13de72372627267e45ba79fa731cf6f6f7 (commit)
- Log -----------------------------------------------------------------
commit e59bc450ba1b263f549185e16a00c7ab57b6c247
Author: Clifford Wolf <clifford@xxxxxxxxxxx>
Date: Thu Oct 8 15:32:41 2009 +0200
don't build --with-async-mode w/ libusb-compat-0.1
Hello,
attached is a little patch that prohibits libftdi from compiling against
libusb-compat-0.1 (the wrapper that provides a libusb-0.1 compatible api
for systems with libusb-1.0) when libftdi is configured with async mode.
unfortunately fixing async mode for libusb-1.0+libusb-compat-0.1 is not
trivial because libusb-1.0 comes with an os abstraction layer that hides
the unix filedescriptor much deeper in internal structures. but failing to
build is imo much better than segfaulting at runtime.
yours,
- clifford
PS: The USB_CLASS_PTP define is not present in any libusb-0.1 release
and has been added to libusb-compat-0.1 only afaics.
-----------------------------------------------------------------------
Summary of changes:
src/ftdi.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/ftdi.c b/src/ftdi.c
index 5051059..5fce9a6 100644
--- a/src/ftdi.c
+++ b/src/ftdi.c
@@ -995,6 +995,9 @@ int ftdi_write_data(struct ftdi_context *ftdi, unsigned
char *buf, int size)
}
#ifdef LIBFTDI_LINUX_ASYNC_MODE
+#ifdef USB_CLASS_PTP
+#error LIBFTDI_LINUX_ASYNC_MODE is not compatible with libusb-compat-0.1!
+#endif
/* this is strongly dependent on libusb using the same struct layout. If libusb
changes in some later version this may break horribly (this is for libusb
0.1.12) */
struct usb_dev_handle
hooks/post-receive
--
A library to talk to FTDI chips
--
libftdi-git - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi-git+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx
|