From e0aebe8a230240b60482b6c0b46c196c0db872e2 Mon Sep 17 00:00:00 2001 From: Joe Marcus Clarke Date: Mon, 23 Feb 2009 23:52:56 +0000 Subject: Fix probe-hiddev building on very recent -CURRENT. --- .../patch-hald_freebsd_probing_probe-hiddev.c | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 sysutils/hal/files/patch-hald_freebsd_probing_probe-hiddev.c diff --git a/sysutils/hal/files/patch-hald_freebsd_probing_probe-hiddev.c b/sysutils/hal/files/patch-hald_freebsd_probing_probe-hiddev.c new file mode 100644 index 000000000000..04dd6fa1a516 --- /dev/null +++ b/sysutils/hal/files/patch-hald_freebsd_probing_probe-hiddev.c @@ -0,0 +1,33 @@ +--- hald/freebsd/probing/probe-hiddev.c.orig 2009-02-23 18:28:54.000000000 -0500 ++++ hald/freebsd/probing/probe-hiddev.c 2009-02-23 18:51:35.000000000 -0500 +@@ -28,9 +28,17 @@ + #include + #include + #include ++#ifndef HAVE_LIBUSB20 + #include + #include + #include ++#else ++#if __FreeBSD_version >= 800064 ++#include ++#else ++#include ++#endif ++#endif + #include + + #include "../libprobe/hfp.h" +@@ -65,7 +73,12 @@ main (int argc, char **argv) + /* give a meaningful process title for ps(1) */ + setproctitle("%s", device_file); + ++#ifdef HAVE_LIBUSB20 ++ report_id = hid_get_report_id(fd); ++ if (report_id == -1) ++#else + if (ioctl(fd, USB_GET_REPORT_ID, &report_id) < 0) ++#endif + goto end; + + hid_init(NULL); -- cgit v1.2.3