From owner-freebsd-ports-bugs@FreeBSD.ORG Wed Aug 5 08:20:02 2009 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E5A03106566B for ; Wed, 5 Aug 2009 08:20:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id B8BAA8FC15 for ; Wed, 5 Aug 2009 08:20:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n758K2fY057765 for ; Wed, 5 Aug 2009 08:20:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n758K2CZ057764; Wed, 5 Aug 2009 08:20:02 GMT (envelope-from gnats) Resent-Date: Wed, 5 Aug 2009 08:20:02 GMT Resent-Message-Id: <200908050820.n758K2CZ057764@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Kai Wang Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6F1061065670; Wed, 5 Aug 2009 08:15:11 +0000 (UTC) (envelope-from kaiwang27@gmail.com) Received: from mail-ew0-f206.google.com (mail-ew0-f206.google.com [209.85.219.206]) by mx1.freebsd.org (Postfix) with ESMTP id 9D39F8FC18; Wed, 5 Aug 2009 08:15:10 +0000 (UTC) (envelope-from kaiwang27@gmail.com) Received: by ewy2 with SMTP id 2so4266397ewy.43 for ; Wed, 05 Aug 2009 01:15:09 -0700 (PDT) Received: by 10.210.63.2 with SMTP id l2mr7878982eba.32.1249458679022; Wed, 05 Aug 2009 00:51:19 -0700 (PDT) Received: from localhost (81-233-38-26-no36.tbcn.telia.com [81.233.38.26]) by mx.google.com with ESMTPS id 10sm4278885eyz.11.2009.08.05.00.51.17 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 05 Aug 2009 00:51:17 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=localhost.my.domain) by localhost with esmtp (Exim 4.69 (FreeBSD)) (envelope-from ) id 1MYbHH-0005fi-AJ; Wed, 05 Aug 2009 09:51:15 +0200 Received: (from kaiw@localhost) by localhost.my.domain (8.14.3/8.14.3/Submit) id n757pFCp021805; Wed, 5 Aug 2009 09:51:15 +0200 (CEST) (envelope-from kaiw) Message-Id: <200908050751.n757pFCp021805@localhost.my.domain> Date: Wed, 5 Aug 2009 09:51:15 +0200 (CEST) From: Kai Wang To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: mva@FreeBSD.org Subject: ports/137452: [PATCH] devel/sdl12: Fix joystick support for FreeBSD 8.x X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Aug 2009 08:20:03 -0000 >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@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: