From f983c8e9d18cee53e63cb58366aaeefe20f47ba4 Mon Sep 17 00:00:00 2001
From: adilger <adilger>
Date: Wed, 12 Mar 2008 10:15:00 +0000
Subject: [PATCH] Branch b1_6 Make the Lustre ioctl.h header conditional upon
 _IOWR (which is defined in every arch ioctl.h) instead of the arch-specific
 _ASMI386_IOCTL_H symbol.

That is still #defined to avoid re-inclusion of the kernel header.
b=14746
i=bowen.zhou
---
 lustre/include/ioctl.h | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/lustre/include/ioctl.h b/lustre/include/ioctl.h
index a4ec8a556e..fc2207bb9a 100644
--- a/lustre/include/ioctl.h
+++ b/lustre/include/ioctl.h
@@ -1,5 +1,13 @@
-#ifndef _ASMI386_IOCTL_H
+#ifndef _IOWR
+
+/* On i386 and x86_64, _ASM_I386_IOCTL_H is defined by the kernel's ioctl.h,
+ * and on newer kernels this header is shared as _ASM_GENERIC_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. b=14746 */
 #define _ASMI386_IOCTL_H
+#define _ASM_GENERIC_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
-- 
GitLab