ports/137452: [PATCH] devel/sdl12: Fix joystick support for FreeBSD 8.x

Kai Wang kaiwang27 at gmail.com
Wed Aug 5 08:20:03 UTC 2009


>Number:         137452
>Category:       ports
>Synopsis:       [PATCH] devel/sdl12: Fix joystick support for FreeBSD 8.x
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Aug 05 08:20:02 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Kai Wang
>Release:        FreeBSD 8.0-CURRENT amd64
>Organization:
>Environment:
System: FreeBSD viskning 8.0-CURRENT FreeBSD 8.0-CURRENT #1: Thu Jul  2 17:09:59 CEST
>Description:
- rep pointer is not initialized before using when __FreeBSD_version > 800063.
  Crash guaranteed if /dev/uhidN devices present.
- PORTREVISION bumped.

Port maintainer (mva at FreeBSD.org) is cc'd.

Generated with FreeBSD Port Tools 0.77
>How-To-Repeat:
>Fix:

--- sdl-1.2.13_4,2.patch begins here ---
diff -ruN --exclude=CVS /usr/home/kaiw/sdl12.orig/Makefile /usr/home/kaiw/sdl12/Makefile
--- /usr/home/kaiw/sdl12.orig/Makefile	2009-08-05 09:41:04.000000000 +0200
+++ /usr/home/kaiw/sdl12/Makefile	2009-08-05 09:38:33.000000000 +0200
@@ -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 -ruN --exclude=CVS /usr/home/kaiw/sdl12.orig/files/patch-src_joystick_bsd_SDL_sysjoystick.c /usr/home/kaiw/sdl12/files/patch-src_joystick_bsd_SDL_sysjoystick.c
--- /usr/home/kaiw/sdl12.orig/files/patch-src_joystick_bsd_SDL_sysjoystick.c	2009-08-05 09:41:03.000000000 +0200
+++ /usr/home/kaiw/sdl12/files/patch-src_joystick_bsd_SDL_sysjoystick.c	2009-08-05 09:33:16.000000000 +0200
@@ -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	2009-08-05 09:30:43.000000000 +0200
++++ src/joystick/bsd/SDL_sysjoystick.c	2009-08-05 09:31:42.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 */
--- sdl-1.2.13_4,2.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list