Skip to content

Commit

Permalink
types.h: don't expose struct ustat to userspace
Browse files Browse the repository at this point in the history
<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>
  • Loading branch information
maximilian attems authored and Linus Torvalds committed May 24, 2008
1 parent 4b6f6ce commit 6c7c6af
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/linux/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -197,13 +197,13 @@ 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;
char f_fname[6];
char f_fpack[6];
};

#endif /* __KERNEL__ */

#endif /* _LINUX_TYPES_H */

0 comments on commit 6c7c6af

Please sign in to comment.