mod to make gspca load for FreeBSD 7

fred hlfw at
Fri Aug 8 19:45:04 UTC 2008

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
void linux_msleep(int ms);

#if defined(msleep)
#undef msleep
#define bsd_sleep   _sleep
#define bsd_sleep  msleep
#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() ?

More information about the freebsd-multimedia mailing list