From owner-freebsd-multimedia@FreeBSD.ORG Fri Aug 8 19:45:03 2008 Return-Path: Delivered-To: multimedia@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DB145106564A for ; Fri, 8 Aug 2008 19:45:03 +0000 (UTC) (envelope-from hlfw@datalync.com) Received: from merlin.vrmetro.com (merlin.vrmetro.com [209.124.34.18]) by mx1.freebsd.org (Postfix) with ESMTP id 90BB28FC0C for ; Fri, 8 Aug 2008 19:45:02 +0000 (UTC) (envelope-from hlfw@datalync.com) Received: from fbsd.hq.datalync.com (ip70-187-86-3.ga.at.cox.net [70.187.86.3]) by merlin.vrmetro.com (8.9.3p2/8.9.0) with ESMTP id PAA97103 for ; Fri, 8 Aug 2008 15:29:28 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by fbsd.hq.datalync.com (8.13.8/8.13.8) with ESMTP id m78JTRq6071179 for ; Fri, 8 Aug 2008 15:29:27 -0400 (EDT) (envelope-from hlfw@datalync.com) From: fred To: multimedia@freebsd.org Date: Fri, 8 Aug 2008 15:29:26 -0400 User-Agent: KMail/1.9.7 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200808081529.27177.hlfw@datalync.com> Cc: Subject: mod to make gspca load for FreeBSD 7 X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Aug 2008 19:45:04 -0000 Ran into a problem with the latest linux-kmod-compat module on FreeBSD 7. the gspca driver still had an unresolved reference to msleep. Looks like the FreeBSD version test in linux_compat.c:linux_msleep() was not working and ended up compiling for a FreeBSD6 kernel. I replaced the FreeBSD version test in linux/module.h void linux_msleep(int ms); #if defined(msleep) #undef msleep #define bsd_sleep _sleep #else #define bsd_sleep msleep #endif #define msleep_compat(ms) linux_msleep(ms) #define msleep(ms) linux_msleep(ms) And changed linux_compat.c:linux_msleep() to just call bsd_sleep instead of calling _sleep() or msleep() based on version. Wondering why the FreeBSD msleep() is used in place of tsleep() ?