[PATCH] linux/inotify.h: do not include <linux/fcntl.h> in userspace

From: Kirill A. Shutemov
Date: Tue Sep 16 2008 - 08:22:18 EST


<linux/fcntl.h> conflicts with glibc's <fcntl.h>.

It breaks building kdelibs, kdepim and pinot. It's regression itroduced
by commit 4006553.

Signed-off-by: Kirill A. Shutemov <kirill@xxxxxxxxxxxxx>
Cc: Ulrich Drepper <drepper@xxxxxxxxxx>
Cc: Davide Libenzi <davidel@xxxxxxxxxxxxxxx>
Cc: David Woodhouse <dwmw2@xxxxxxxxxxxxx>
Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---
include/linux/inotify.h | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/include/linux/inotify.h b/include/linux/inotify.h
index bd57857..792b6f0 100644
--- a/include/linux/inotify.h
+++ b/include/linux/inotify.h
@@ -7,8 +7,10 @@
#ifndef _LINUX_INOTIFY_H
#define _LINUX_INOTIFY_H

+#ifdef __KERNEL__
/* For O_CLOEXEC and O_NONBLOCK */
#include <linux/fcntl.h>
+#endif
#include <linux/types.h>

/*
--
1.5.6.5.GIT

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/