]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
staging/lustre: fix build on s390
authorPeng Tao <bergwolf@gmail.com>
Mon, 15 Jul 2013 14:27:11 +0000 (22:27 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 23 Jul 2013 19:24:02 +0000 (12:24 -0700)
As reported by Fengguang:
In file included from drivers/staging/lustre/lustre/obdclass/../include/lustre/lustre_idl.h:99:0,
    from drivers/staging/lustre/lustre/obdclass/../include/lprocfs_status.h:46,
    from drivers/staging/lustre/lustre/obdclass/../include/obd_support.h:42,
    from drivers/staging/lustre/lustre/obdclass/../include/obd_class.h:40,
    from drivers/staging/lustre/lustre/obdclass/lu_object.c:53:
drivers/staging/lustre/lustre/obdclass/../include/lustre/lustre_user.h:356:10: error: field 'lmd_st' has incomplete type
drivers/staging/lustre/lustre/obdclass/../include/lustre/lustre_user.h:361:10: error: field 'lmd_st' has incomplete type

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Peng Tao <tao.peng@emc.com>
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/include/linux/lustre_user.h

index ebaf92977f7fc1396a3145a1cee3041aefbaab10..ea9393c625cc6ca5b952e69288ff29e9c5126b7d 100644 (file)
 
 #include <linux/string.h>
 
 
 #include <linux/string.h>
 
-#if defined(__x86_64__) || defined(__ia64__) || defined(__ppc64__) || \
-    defined(__craynv) || defined (__mips64__) || defined(__powerpc64__)
-typedef struct stat     lstat_t;
-#define lstat_f         lstat
-#define HAVE_LOV_USER_MDS_DATA
-#else
+/*
+ * We need to always use 64bit version because the structure
+ * is shared across entire cluster where 32bit and 64bit machines
+ * are co-existing.
+ */
+#if __BITS_PER_LONG != 64 || defined(__ARCH_WANT_STAT64)
 typedef struct stat64   lstat_t;
 #define lstat_f         lstat64
 typedef struct stat64   lstat_t;
 #define lstat_f         lstat64
-#define HAVE_LOV_USER_MDS_DATA
+#else
+typedef struct stat     lstat_t;
+#define lstat_f         lstat
 #endif
 
 #endif
 
+#define HAVE_LOV_USER_MDS_DATA
+
 #endif /* _LUSTRE_USER_H */
 #endif /* _LUSTRE_USER_H */