[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080916133112.GB15951@cs181140183.pp.htv.fi>
Date: Tue, 16 Sep 2008 16:31:12 +0300
From: Adrian Bunk <bunk@...nel.org>
To: "Kirill A. Shutemov" <kirill@...temov.name>
Cc: linux-kernel@...r.kernel.org, Ulrich Drepper <drepper@...hat.com>,
Davide Libenzi <davidel@...ilserver.org>,
David Woodhouse <dwmw2@...radead.org>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH] linux/inotify.h: do not include <linux/fcntl.h> in
userspace
On Tue, Sep 16, 2008 at 04:02:36PM +0300, Kirill A. Shutemov wrote:
> On Tue, Sep 16, 2008 at 03:58:02PM +0300, Adrian Bunk wrote:
> > On Tue, Sep 16, 2008 at 03:22:43PM +0300, Kirill A. Shutemov wrote:
> > > <linux/fcntl.h> conflicts with glibc's <fcntl.h>.
> > >
> > > It breaks building kdelibs, kdepim and pinot.
> >
> > We should rather fix the actual bug.
> >
> > What is the error message?
>
> /usr/include/asm-generic/fcntl.h:117: error: redefinition of 'struct
> flock'
> /usr/include/bits/fcntl.h:142: error: previous definition of 'struct
> flock'
> /usr/include/asm-generic/fcntl.h:140: error: redefinition of 'struct
> flock64'
> /usr/include/bits/fcntl.h:157: error: previous definition of 'struct
> flock64'
>...
Kernel headers and glibc headers are an own story, Ulrich might know
best about that.
But I'm wondering, why is kdelibs doing
<-- snip -->
...
#include <fcntl.h>
#include <sys/syscall.h>
#include <linux/types.h>
// Linux kernel headers are documented to not compile
#define _S390_BITOPS_H
#include <linux/inotify.h>
static inline int inotify_init (void)
{
return syscall (__NR_inotify_init);
}
...
<-- snip -->
pinot even contains a file with the inotify syscall numbers for all
architectures.
inotify_init(2) already documents the following usage:
<-- snip -->
...
#include <sys/inotify.h>
int inotify_init(void);
...
<-- snip -->
Unless someone knows a good reason against that (and no matter how the
kernel situation will change) I'll send patches to get KDE fixed in this
respect.
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists