diff options
author | Marcus von Appen <mva@FreeBSD.org> | 2009-08-08 08:49:29 +0000 |
---|---|---|
committer | Marcus von Appen <mva@FreeBSD.org> | 2009-08-08 08:49:29 +0000 |
commit | 6f7a6277363ce3a5bb6804b08c119b51fff320d9 (patch) | |
tree | 277f29b38b9dde5c33fb99f3e27e8f336caf0ee5 /devel/sdl12 | |
parent | b11cd845cd4a89bca5b6c74b19edf8478cd9bbdf (diff) |
Fix crashes when joysticks are attached on -CURRENT.
PR: ports/136973
Reviewed by: Wes Morgan <morganw@chemikals.org>
Approved by: miwi (mentor)
Notes
Notes:
svn path=/head/; revision=239144
Diffstat (limited to 'devel/sdl12')
-rw-r--r-- | devel/sdl12/Makefile | 2 | ||||
-rw-r--r-- | devel/sdl12/files/patch-src_joystick_bsd_SDL_sysjoystick.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/devel/sdl12/Makefile b/devel/sdl12/Makefile index c3a3640ccaaf..95534b868af2 100644 --- a/devel/sdl12/Makefile +++ b/devel/sdl12/Makefile @@ -7,7 +7,7 @@ PORTNAME= sdl PORTVERSION= 1.2.13 -PORTREVISION= 3 +PORTREVISION= 4 PORTEPOCH= 2 CATEGORIES= devel MASTER_SITES= http://www.libsdl.org/release/ diff --git a/devel/sdl12/files/patch-src_joystick_bsd_SDL_sysjoystick.c b/devel/sdl12/files/patch-src_joystick_bsd_SDL_sysjoystick.c index e7e503fad2ab..e6ae80605ba5 100644 --- a/devel/sdl12/files/patch-src_joystick_bsd_SDL_sysjoystick.c +++ b/devel/sdl12/files/patch-src_joystick_bsd_SDL_sysjoystick.c @@ -1,5 +1,5 @@ ---- src/joystick/bsd/SDL_sysjoystick.c.orig 2009-03-12 22:54:57.000000000 +0100 -+++ src/joystick/bsd/SDL_sysjoystick.c 2009-03-12 23:04:53.000000000 +0100 +--- src/joystick/bsd/SDL_sysjoystick.c.orig 2007-12-31 05:47:55.000000000 +0100 ++++ src/joystick/bsd/SDL_sysjoystick.c 2009-08-05 08:34:06.000000000 +0200 @@ -74,6 +74,13 @@ #define MAX_JOY_JOYS 2 #define MAX_JOYS (MAX_UHID_JOYS + MAX_JOY_JOYS) @@ -28,11 +28,11 @@ goto usberr; } - + rep = &hw->inreport; +#if defined(__FREEBSD__) && (__FreeBSD_version > 800063) + rep->rid = hid_get_report_id(fd); + if (rep->rid < 0) { +#else - rep = &hw->inreport; if (ioctl(fd, USB_GET_REPORT_ID, &rep->rid) < 0) { +#endif rep->rid = -1; /* XXX */ |