[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Please help: jazip build error on ia64

On Wed, Jul 23, 2003 at 09:47:59AM -0400, Peter S Galbraith wrote:
> Thanks for the reply.
> Matthew Wilcox <willy@debian.org> wrote:
> > On Tue, Jul 22, 2003 at 11:11:12AM -0400, Peter S Galbraith wrote:
> > > http://bugs.debian.org/200167 reports a build error on ia64.
> > > jazip includes /usr/include/linux/fs.h from mount_z.c
> > 
> > ... it shouldn't. 
> Why is that?

because userspace shouldn't be including kernel headers.

> >                    what does it need from that file?
> Jazip implements its own mount.  If I comment out the include, I get:
> gcc -O -m486   -c -o mount_z.o mount_z.c
> mount_z.c: In function `z_mount':
> mount_z.c:75: storage size of `fs' isn't known
> mount_z.c:132: `MS_NOSUID' undeclared (first use in this function)
> mount_z.c:132: (Each undeclared identifier is reported only once
> mount_z.c:132: for each function it appears in.)
> mount_z.c:132: `MS_RDONLY' undeclared (first use in this function)
> make: *** [mount_z.o] Error 1

why is it insufficient to do what the manpage says:

MOUNT(2)                   Linux Programmerâ??s Manual                  MOUNT(2)

       mount, umount - mount and unmount filesystems.

       #include <sys/mount.h>

       int mount(const char *source, const char *target , const char *filesysâ??
       temtype, unsigned long mountflags , const void *data);

       int umount(const char *target);

ie get those values from sys/mount.h

you probably also need sys/vfs.h for statfs.

"It's not Hollywood.  War is real, war is primarily not about defeat or
victory, it is about death.  I've seen thousands and thousands of dead bodies.
Do you think I want to have an academic debate on this subject?" -- Robert Fisk

Reply to: