Paul,
I cleaned this up a bit - it compiles with warnings about shadowed
declarations, but they are harmless. You *don't* need to change owfs.h - it
works fine now without modification. ow.h and configure do need changes, this
ow.h supercedes the previous one.
I'm going to leave this alone now!
Rob.
--- /usr/home/robert/build/owfs-2.4p3/module/owlib/src/include/ow.h Fri Jun
23 17:50:23 2006
+++ /usr/home/robert/build/owfs-2.4p3.rob/module/owlib/src/include/ow.h Sun Jul
23 17:54:35 2006
@@ -99,7 +99,7 @@
#include <termios.h>
#include <errno.h>
#include <syslog.h>
-#include <sys/file.h> /* for flock */
+// #include <sys/file.h> /* for flock */
#ifdef HAVE_GETOPT_H
#include <getopt.h> /* for long options */
#endif
@@ -209,6 +209,23 @@
#endif /* OW_MT */
#if OW_USB
+ #ifdef __FreeBSD__
+ // Add a few definitions we need
+ #undef HAVE_USB_INTERRUPT_READ // This call in libusb is unneeded for
FreeBSD (and it's broken)
+ #include <dev/usb/usb.h>
+ struct usb_dev_handle {
+ int fd;
+ struct usb_bus *bus;
+ struct usb_device *device;
+ int config;
+ int interface;
+ int altsetting;
+ void *impl_info;
+ };
+ #define USB_CLEAR_HALT BSD_usb_clear_halt
+ #else
+ #define USB_CLEAR_HALT usb_clear_halt
+ #endif
#include <usb.h>
#endif /* OW_USB */
--- /usr/home/robert/build/owfs-2.4p3/configure Fri Jun 23 18:03:30 2006
+++ /usr/home/robert/build/owfs-2.4p3.rob/configure Sun Jul 23 17:32:00 2006
@@ -23199,10 +23199,13 @@
echo "$as_me:$LINENO: checking if cflag _XOPEN_SOURCE is required" >&5
echo $ECHO_N "checking if cflag _XOPEN_SOURCE is required... $ECHO_C" >&6
case "${host_cpu}-${host_os}" in
- *-aix* | *-freebsd* | *-darwin* | *solaris* | *-osf* | *-hpux*)
+ *-aix* | *-darwin* | *solaris* | *-osf* | *-hpux*)
CFLAGS="$CFLAGS -D_XOPEN_SOURCE=500"
echo "$as_me:$LINENO: result: -D_XOPEN_SOURCE=500" >&5
echo "${ECHO_T}-D_XOPEN_SOURCE=500" >&6
+ ;;
+ *-freebsd*)
+ echo "$as_me:$LINENO: result: <blank>" >&5
;;
*)
echo "$as_me:$LINENO: result: no" >&5
%
-------------------------------------------------------------------------
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
_______________________________________________
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers