Hi,
Here is yet another patch. Problem is that although we link against libusb,
HAVE_USB was previously undefined and thus, USB support is not really
included.
HS
Index: openobex-anoncvs/acinclude.m4
===================================================================
--- openobex-anoncvs.orig/acinclude.m4 2007-01-26 02:20:23.684591612 +0100
+++ openobex-anoncvs/acinclude.m4 2007-01-26 02:20:46.986047862 +0100
@@ -147,19 +147,31 @@
])
AC_DEFUN([AC_PATH_USB], [
+ usb_lib_found=no
case $host in
*-*-mingw32*)
USB_CFLAGS=""
USB_LIBS="-lusb"
+ usb_lib_found=yes
;;
*)
- PKG_CHECK_MODULES(USB, libusb, usb_found=yes, AC_MSG_RESULT(no))
+ PKG_CHECK_MODULES(USB, libusb, usb_lib_found=yes, AC_MSG_RESULT(no))
;;
esac
AC_SUBST(USB_CFLAGS)
AC_SUBST(USB_LIBS)
- AC_CHECK_LIB(usb, usb_get_busses, dummy=yes, AC_DEFINE(NEED_USB_GET_BUSSES, 1, [Define to 1 if you need the usb_get_busses() function.]))
- AC_CHECK_LIB(usb, usb_interrupt_read, dummy=yes, AC_DEFINE(NEED_USB_INTERRUPT_READ, 1, [Define to 1 if you need the usb_interrupt_read() function.]))
+
+ usb_get_busses=no
+ AC_CHECK_LIB(usb, usb_get_busses, usb_get_busses=yes, AC_DEFINE(NEED_USB_GET_BUSSES, 1, [Define to 1 if you need the usb_get_busses() function.]))
+
+ usb_interrupt_read=no
+ AC_CHECK_LIB(usb, usb_interrupt_read, usb_interrupt_read=yes, AC_DEFINE(NEED_USB_INTERRUPT_READ, 1, [Define to 1 if you need the usb_interrupt_read() function.]))
+
+ if (test "$usb_lib_found" = "yes" && test "$usb_get_busses" = "yes" && test "$usb_interrupt_read" = "yes"); then
+ usb_found=yes
+ else
+ usb_found=no
+ fi
])
AC_DEFUN([AC_PATH_GLIB], [
Index: openobex-anoncvs/lib/usbobex.h
===================================================================
--- openobex-anoncvs.orig/lib/usbobex.h 2007-01-26 02:20:21.400448862 +0100
+++ openobex-anoncvs/lib/usbobex.h 2007-01-26 02:20:47.002048862 +0100
@@ -59,12 +59,12 @@
/* "Union Functional Descriptor" from CDC spec 5.2.3.X
* used to find data/slave OBEX interface */
struct cdc_union_desc {
- u_int8_t bLength;
- u_int8_t bDescriptorType;
- u_int8_t bDescriptorSubType;
+ uint8_t bLength;
+ uint8_t bDescriptorType;
+ uint8_t bDescriptorSubType;
- u_int8_t bMasterInterface0;
- u_int8_t bSlaveInterface0;
+ uint8_t bMasterInterface0;
+ uint8_t bSlaveInterface0;
} __attribute__ ((packed));
/* CDC class and subclass types */
Index: openobex-anoncvs/lib/usbobex.c
===================================================================
--- openobex-anoncvs.orig/lib/usbobex.c 2007-01-26 02:20:21.476453612 +0100
+++ openobex-anoncvs/lib/usbobex.c 2007-01-26 02:20:47.026050362 +0100
@@ -37,8 +37,14 @@
#include <unistd.h>
#include <stdio.h> /* perror */
#include <errno.h> /* errno and EADDRNOTAVAIL */
+
+
+#ifdef _WIN32
+#include <windows.h>
+#else
#include <netinet/in.h>
#include <sys/socket.h>
+#endif
#include <usb.h>
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Openobex-users mailing list
[email protected]
http://lists.sourceforge.net/lists/listinfo/openobex-users