lkml.org 
[lkml]   [2008]   [Sep]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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



\
 
 \ /
  Last update: 2008-09-16 15:33    [W:0.046 / U:0.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site