From 0f2a47eabd726fa150ca17894aafe6c524698cc8 Mon Sep 17 00:00:00 2001
From: bwzhou <bwzhou>
Date: Thu, 27 Mar 2008 11:17:04 +0000
Subject: [PATCH] Branch HEAD b=14746 r=adilger, bwzhou

patch for _IOWR redefined build error on SLES10 environment
---
 lustre/include/ioctl.h | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/lustre/include/ioctl.h b/lustre/include/ioctl.h
index a4ec8a556e..6c3eb5ac2b 100644
--- a/lustre/include/ioctl.h
+++ b/lustre/include/ioctl.h
@@ -1,5 +1,14 @@
-#ifndef _ASMI386_IOCTL_H
-#define _ASMI386_IOCTL_H
+
+#ifndef _IOWR
+
+/*
+ * on i386 and x86_64, _ASM_I386_IOCTL_H is defined by the kernel's ioctl.h
+ *
+ * We can avoid any problems with the kernel header being included again
+ * by defining _ASM_I386_IOCTL_H here so that a later occurence of
+ * <asm/ioctl.h> does not include the kernel's ioctl.h after this one.
+ */
+#define _ASM_I386_IOCTL_H
 
 /* ioctl command encoding: 32 bits total, command in lower 16 bits,
  * size of the parameter structure in the lower 14 bits of the
@@ -61,4 +70,5 @@
 #define IOCSIZE_MASK    (_IOC_SIZEMASK << _IOC_SIZESHIFT)
 #define IOCSIZE_SHIFT   (_IOC_SIZESHIFT)
 
-#endif /* _ASMI386_IOCTL_H */
+#endif /* _IOWR */
+
-- 
GitLab