FreeBSD compile fix
authorSam Lantinga <slouken@libsdl.org>
Wed, 15 Feb 2012 21:06:45 -0500
changeset 62904cf8e87aff95
parent 6288 1204ff03a0c1
child 6291 d88e5195dee3
FreeBSD compile fix

Robert Millan

src/joystick/bsd/SDL_sysjoystick.c makes the invalid assumption that
__FreeBSD_kernel__ implies presence of "ucr_data" struct member. This
breaks recent versions of FreeBSD 10-CURRENT, FreeBSD 9-STABLE and
Debian GNU/kFreeBSD "wheezy/sid".
src/joystick/bsd/SDL_sysjoystick.c
     1.1 --- a/src/joystick/bsd/SDL_sysjoystick.c	Tue Feb 14 20:54:44 2012 -0500
     1.2 +++ b/src/joystick/bsd/SDL_sysjoystick.c	Wed Feb 15 21:06:45 2012 -0500
     1.3 @@ -149,7 +149,7 @@
     1.4  static int report_alloc(struct report *, struct report_desc *, int);
     1.5  static void report_free(struct report *);
     1.6  
     1.7 -#if defined(USBHID_UCR_DATA) || defined(__FreeBSD_kernel__)
     1.8 +#if defined(USBHID_UCR_DATA)
     1.9  #define REP_BUF_DATA(rep) ((rep)->buf->ucr_data)
    1.10  #elif (defined(__FREEBSD__) && (__FreeBSD_kernel_version > 800063))
    1.11  #define REP_BUF_DATA(rep) ((rep)->buf->ugd_data)