"Adam J. Richter" <adam@yggdrasil.com> writes:
> linux-2.5.59/sound/sound_firmware.c attempts to use the
> user level system call interface from the kernel, which I understand
> works on i386 and perhaps all architectures, but requires a variable
> named "errno."
Which is provided in-kernel (not for modules) by 'lib/errno.c'.
> (Actually, it mixed things like close() and sys_close(), but that's
> beside the point.)
Those are provided by <linux/unistd.h>, with __KERNEL_SYSCALLS__
defined.
> I could just declare a "static int errno;" in the file,
That was originally there, but removed in 2.5.57 IIRC.
<linux/unistd.h> has 'extern int errno;' -- so 'static int errno;'
would be a bug.
- Hari
-- Raja R Harinath ------------------------------ harinath@cs.umn.edu - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/