src/joystick/bsd/SDL_sysjoystick.c
changeset 3366 8cd9ed45c020
parent 2859 99210400e8b9
child 3367 7a7a61a1484d
     1.1 --- a/src/joystick/bsd/SDL_sysjoystick.c	Sat Oct 10 09:22:20 2009 +0000
     1.2 +++ b/src/joystick/bsd/SDL_sysjoystick.c	Sat Oct 10 09:36:12 2009 +0000
     1.3 @@ -309,7 +309,7 @@
     1.4                       hw->path);
     1.5          goto usberr;
     1.6      }
     1.7 -#if defined(USBHID_NEW) || (defined(__FREEBSD__) && __FreeBSD_version >= 500111)
     1.8 +#if defined(USBHID_NEW) || (defined(__FREEBSD__) && __FreeBSD_kernel_version >= 500111)
     1.9      hdata = hid_start_parse(hw->repdesc, 1 << hid_input, rep->rid);
    1.10  #else
    1.11      hdata = hid_start_parse(hw->repdesc, 1 << hid_input);
    1.12 @@ -451,7 +451,7 @@
    1.13      if (read(joy->hwdata->fd, REP_BUF_DATA(rep), rep->size) != rep->size) {
    1.14          return;
    1.15      }
    1.16 -#if defined(USBHID_NEW) || (defined(__FREEBSD__) && __FreeBSD_version >= 500111)
    1.17 +#if defined(USBHID_NEW) || (defined(__FREEBSD__) && __FreeBSD_kernel_version >= 500111)
    1.18      hdata = hid_start_parse(joy->hwdata->repdesc, 1 << hid_input, rep->rid);
    1.19  #else
    1.20      hdata = hid_start_parse(joy->hwdata->repdesc, 1 << hid_input);
    1.21 @@ -547,8 +547,8 @@
    1.22  #ifdef __DragonFly__
    1.23      len = hid_report_size(rd, r->rid, repinfo[repind].kind);
    1.24  #elif __FREEBSD__
    1.25 -# if (__FreeBSD_version >= 460000)
    1.26 -#  if (__FreeBSD_version <= 500111)
    1.27 +# if (__FreeBSD_kernel_version >= 460000) || defined(__FreeBSD_kernel__)
    1.28 +#  if (__FreeBSD_kernel_version <= 500111)
    1.29      len = hid_report_size(rd, r->rid, repinfo[repind].kind);
    1.30  #  else
    1.31      len = hid_report_size(rd, repinfo[repind].kind, r->rid);