Whamcloud - gitweb
Fix warnings with compile liblustre at sles10/rhel5 which have
[fs/lustre-release.git] / lnet / include / libcfs / linux / kp30.h
index fb1ae3e..7de45d6 100644 (file)
@@ -23,7 +23,6 @@
 # include <linux/kmod.h>
 # include <linux/notifier.h>
 # include <linux/fs.h>
-# include <asm/segment.h>
 # include <linux/miscdevice.h>
 # include <linux/vmalloc.h>
 # include <linux/time.h>
@@ -183,9 +182,7 @@ static inline void our_cond_resched(void)
 #else  /* !__KERNEL__ */
 # include <stdio.h>
 # include <stdlib.h>
-#ifdef CRAY_XT3
-# include <ioctl.h>
-#elif defined(__CYGWIN__)
+#if defined(__CYGWIN__)
 # include <cygwin-ioctl.h>
 #else
 # include <stdint.h>
@@ -195,6 +192,9 @@ static inline void our_cond_resched(void)
 # include <limits.h>
 # include <errno.h>
 # include <sys/ioctl.h>                         /* for _IOWR */
+#ifndef _IOWR
+#include "ioctl.h"
+#endif
 
 # define CFS_MODULE_PARM(name, t, type, perm, desc)
 #define PORTAL_SYMBOL_GET(x) inter_module_get(#x)
@@ -340,7 +340,7 @@ extern int  lwt_snapshot (cycles_t *now, int *ncpu, int *total_size,
  #define _LWORDSIZE __WORDSIZE
 #endif
 
-#if (defined(__x86_64__) && (defined(__KERNEL__) || defined(CRAY_XT3)))
+#if (defined(__x86_64__) && (defined(__KERNEL__) || defined(CRAY_XT3))) || defined(HAVE_U64_LONG_LONG)
 /* x86_64 defines __u64 as "long" in userspace, but "long long" in the kernel */
 # define LPU64 "%Lu"
 # define LPD64 "%Ld"