FreeBSD compile fix SDL-1.2
authorSam Lantinga <slouken@libsdl.org>
Wed, 15 Feb 2012 21:06:08 -0500
branchSDL-1.2
changeset 6289 62ff1c0a103f
parent 6279 8e98c714bb2a
child 6293 57a55e457ef6
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
--- a/src/joystick/bsd/SDL_sysjoystick.c	Sat Feb 04 18:12:20 2012 -0500
+++ b/src/joystick/bsd/SDL_sysjoystick.c	Wed Feb 15 21:06:08 2012 -0500
@@ -148,7 +148,7 @@
 static int	report_alloc(struct report *, struct report_desc *, int);
 static void	report_free(struct report *);
 
-#if defined(USBHID_UCR_DATA) || defined(__FreeBSD_kernel__)
+#if defined(USBHID_UCR_DATA)
 #define REP_BUF_DATA(rep) ((rep)->buf->ucr_data)
 #elif (defined(__FREEBSD__) && (__FreeBSD_kernel_version > 800063))
 #define REP_BUF_DATA(rep) ((rep)->buf->ugd_data)