]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
types.h: don't expose struct ustat to userspace
authormaximilian attems <max@stro.at>
Sat, 24 May 2008 17:40:14 +0000 (17:40 +0000)
committerChris Wright <chrisw@sous-sol.org>
Mon, 9 Jun 2008 18:27:01 +0000 (11:27 -0700)
upstream commit: 6c7c6afbb8c0e60d32a563cae7c6889211e9d9d8

<linux/types.h> can't be used together with <sys/ustat.h> because they
both define struct ustat:

    $ cat test.c
    #include <sys/ustat.h>
    #include <linux/types.h>
    $ gcc -c test.c
    In file included from test.c:2:
    /usr/include/linux/types.h:165: error: redefinition of 'struct ustat'

has been reported a while ago to debian, but seems to have been
lost in cat fighting: http://bugs.debian.org/429064

Signed-off-by: maximilian attems <max@stro.at>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
include/linux/types.h

index 9dc2346627b4b5c6c825dc09143041a66d22c092..d4a9ce6e2760394a7fb29d4812e03a4728a9a555 100644 (file)
@@ -197,8 +197,6 @@ typedef u64 resource_size_t;
 typedef u32 resource_size_t;
 #endif
 
-#endif /* __KERNEL__ */
-
 struct ustat {
        __kernel_daddr_t        f_tfree;
        __kernel_ino_t          f_tinode;
@@ -206,4 +204,6 @@ struct ustat {
        char                    f_fpack[6];
 };
 
+#endif /* __KERNEL__ */
+
 #endif /* _LINUX_TYPES_H */