Re: [PATCH] warning: `__attribute_used__' redefined

From: Valdis . Kletnieks
Date: Tue Feb 10 2004 - 12:53:34 EST


On Tue, 10 Feb 2004 12:10:55 EST, Daniel Jacobowitz said:

> This is what Debian has been using. I believe the other folks with a
> glibc-kernel-headers package based on 2.6 do something similar. I
> don't know how you'll feel about adding this sort of crap to the

I found this in the Fedora linux-2.6.0-compile.patch included in their
kernel-2.6.1-1.65.src.rpm. A bit more hard-line. :)

Anybody want to push it for the Linus or -mm trees? ;)

--- linux-2.6.0-test11/include/linux/config.h~ 2003-12-11 09:29:14.090625985 +0100
+++ linux-2.6.0-test11/include/linux/config.h 2003-12-11 09:29:14.090625985 +0100
@@ -2,5 +2,7 @@
#define _LINUX_CONFIG_H

#include <linux/autoconf.h>
-
+#ifndef __KERNEL__
+#error including kernel header in userspace; use the glibc headers instead!
+#endif
#endif

Attachment: pgp00000.pgp
Description: PGP signature