Re: Patch?: linux-2.5.59/sound/soundcore.c referenced non-existant errno variable

From: Raja R Harinath (
Date: Fri Jan 17 2003 - 21:49:36 EST


"Adam J. Richter" <> 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__

> 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 ------------------------------
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Thu Jan 23 2003 - 22:00:17 EST