$NetBSD: patch-ag,v 1.4 2005/11/17 19:54:09 joerg Exp $ --- src/unix/joystick-drivers/joy_usb.c.orig 2005-11-17 16:19:51.000000000 +0000 +++ src/unix/joystick-drivers/joy_usb.c @@ -22,7 +22,7 @@ struct rc_option joy_usb_opts[] = { #ifdef USB_JOYSTICK -#if !defined(__ARCH_openbsd) && !defined(__ARCH_netbsd) && !defined(__ARCH_freebsd) +#if !defined(__ARCH_openbsd) && !defined(__ARCH_netbsd) && !defined(__ARCH_freebsd) && !defined(__ARCH_dragonfly) #error "USB joysticks are only supported under OpenBSD, NetBSD and FreeBSD. Patches to support other archs are welcome ;)" #endif @@ -47,8 +47,13 @@ struct rc_option joy_usb_opts[] = { #include #endif +#ifdef __ARCH_dragonfly +#include +#include +#else #include #include +#endif int axis_usage[] = { HUG_X, HUG_Y, HUG_Z, @@ -118,7 +123,7 @@ static int joy_initialize_hid(int i) } #if defined(HAVE_USBHID_H) || defined(HAVE_LIBUSBHID_H) -#if defined(__ARCH_openbsd) || defined(__ARCH_netbsd) || (defined(__ARCH_freebsd) && __FreeBSD_version > 500000) +#if defined(__ARCH_openbsd) || defined(__ARCH_netbsd) || (defined(__ARCH_freebsd) && __FreeBSD_version > 500000) || defined(__ARCH_dragonfly) if (ioctl(joy_data[i].fd, USB_GET_REPORT_ID, &report_id) < 0) { fprintf(stderr_file, "error: /dev/uhid%d: %s", i, strerror(errno));