diff options
author | mva <mva@FreeBSD.org> | 2009-08-08 16:49:29 +0800 |
---|---|---|
committer | mva <mva@FreeBSD.org> | 2009-08-08 16:49:29 +0800 |
commit | 4fbb49dd9abb5f582d61c072327dfed40224cead (patch) | |
tree | c2ec2e31ecb35b584817c9c9991dd261dc776549 /devel | |
parent | 32c03ab2b3872fcbb43f664335723da939d80dac (diff) | |
download | freebsd-ports-gnome-4fbb49dd9abb5f582d61c072327dfed40224cead.tar.gz freebsd-ports-gnome-4fbb49dd9abb5f582d61c072327dfed40224cead.tar.zst freebsd-ports-gnome-4fbb49dd9abb5f582d61c072327dfed40224cead.zip |
Fix crashes when joysticks are attached on -CURRENT.
PR: ports/136973
Reviewed by: Wes Morgan <morganw@chemikals.org>
Approved by: miwi (mentor)
Diffstat (limited to 'devel')
-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 */ |