devel/linux-kmod-compat bit me

Bruce M Simpson bms at incunabulum.net
Mon Sep 8 20:30:52 UTC 2008


"link_elf: symbol msleep undefined"...

Further here:
    http://www.daemonforums.org/showthread.php?p=12764#post12764

This just bit me, the attached fixes seem to work for me (I can load the 
drivers into the kernel).

It turns out that the __FreeBSD_version cpp conditional is incorrect for 
7.0-RELEASE shipping systems. The key observation was that on line 76 of 
linux_compat.c, msleep() is in fact undefined.

The only cam I have at the moment is the Trust Spacec at m 380 which is not 
supported by the ported ov511 driver, I'm waiting on more units arriving.
-------------- next part --------------
--- ./linux/module.h.bak	2008-09-08 20:55:25.000000000 +0100
+++ ./linux/module.h	2008-09-08 21:01:06.000000000 +0100
@@ -209,7 +209,7 @@
 #define udelay(t)	DELAY(t)
 void linux_msleep(int ms);
 
-#if __FreeBSD_version > 700100
+#if __FreeBSD_version > 700054
 // adapt to a change between FreeBSD 6.x and 7.x
 #define msleep_compat(ms)       linux_msleep(ms)
 #undef msleep
-------------- next part --------------
--- ./linux_compat.c.bak	2008-09-08 20:55:37.000000000 +0100
+++ ./linux_compat.c	2008-09-08 21:01:14.000000000 +0100
@@ -69,7 +69,7 @@
 void
 linux_msleep(int ms)
 {
-#if __FreeBSD_version > 700100
+#if __FreeBSD_version > 700054
 	_sleep("linux-msleep", NULL, 0 /* PRI */,
 #else
         /* call the FreeBSD msleep */


More information about the freebsd-multimedia mailing list