Bug#429064: linux-libc-dev: <linux/types.h> conflicts with <sys/ustat.h>
tag 429064 + patch
reassign 429064 linux-libc-dev
thanks
On Fri, Jun 15, 2007 at 10:17:23PM +0200, Matej Vela wrote:
> Bastian Blank <waldi@debian.org> writes:
>
> >> linux-libc-dev should not directly export a kernel structure. Either
> >> remove it or use #ifdef __KERNEL__, but don't bother us with that.
> >
> > It is part of the userspace interface which is redefined in
> > bits/ustat.h.
> >
> > Anyway, it is no bug in the kernel to export its userspace interface.
>
> I think "#ifdef __KERNEL__" is the traditional approach here. It's
> already used for a number of userspace interfaces -- struct sockaddr in
> <linux/socket.h>, S_* in <linux/stat.h> -- and it won't break existing
> code.
>
I think so, please find below a simple patch to implement that:
--- linux-2.6.22.orig/include/linux/types.h 2007-07-09 01:32:17.000000000 +0200
+++ linux-2.6.22/include/linux/types.h 2007-07-18 21:45:19.000000000 +0200
@@ -198,8 +198,6 @@
typedef u32 resource_size_t;
#endif
-#endif /* __KERNEL__ */
-
struct ustat {
__kernel_daddr_t f_tfree;
__kernel_ino_t f_tinode;
@@ -207,4 +205,6 @@
char f_fpack[6];
};
+#endif /* __KERNEL__ */
+
#endif /* _LINUX_TYPES_H */
--
.''`. Aurelien Jarno | GPG: 1024D/F1BCDB73
: :' : Debian developer | Electrical Engineer
`. `' aurel32@debian.org | aurelien@aurel32.net
`- people.debian.org/~aurel32 | www.aurel32.net
Reply to: