Skip to content

Commit

Permalink
FreeBSD compile fix
Browse files Browse the repository at this point in the history
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".
  • Loading branch information
slouken committed Feb 16, 2012
1 parent 3b2c0bc commit d836339
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/joystick/bsd/SDL_sysjoystick.c
Expand Up @@ -148,7 +148,7 @@ static char *joydevnames[MAX_JOYS];
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)
Expand Down

0 comments on commit d836339

Please sign in to comment.