]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Remove offsetof() from user-visible <linux/stddef.h>
authorDavid Woodhouse <dwmw2@infradead.org>
Fri, 22 Sep 2006 07:00:42 +0000 (08:00 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 13 Oct 2006 20:23:24 +0000 (13:23 -0700)
It's not used by anything user-visible, and it make g++ unhappy.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
include/linux/Kbuild
include/linux/stddef.h

index 7d076d97b2f7f9636ac04f2d84dff6672715f4cb..10d2ca07562a0e07f27c71ca81e37f088bd2fec9 100644 (file)
@@ -143,7 +143,6 @@ header-y += snmp.h
 header-y += sockios.h
 header-y += som.h
 header-y += sound.h
-header-y += stddef.h
 header-y += synclink.h
 header-y += telephony.h
 header-y += termios.h
@@ -318,6 +317,7 @@ unifdef-y += sonet.h
 unifdef-y += sonypi.h
 unifdef-y += soundcard.h
 unifdef-y += stat.h
+unifdef-y += stddef.h
 unifdef-y += sysctl.h
 unifdef-y += tcp.h
 unifdef-y += time.h
index b3a2cadf90f2ae13157a05db66693831b82ba5ae..ea65dfb60cd80e19d2a5a1ce9a5f00194017e4c0 100644 (file)
 #define NULL ((void *)0)
 #endif
 
+#ifdef __KERNEL__
 #undef offsetof
 #ifdef __compiler_offsetof
 #define offsetof(TYPE,MEMBER) __compiler_offsetof(TYPE,MEMBER)
 #else
 #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
 #endif
+#endif /* __KERNEL__ */
 
 #endif