Cross compiling between different byte orders does not work with the current
tree, because XFS uses the byte order defines from the host's libc. This
patch fixes it for Linux by making it use the kernel includes.
-Andi
--- linux/fs/xfs/xfs_arch.h-o Sat May 27 12:15:23 2000
+++ linux/fs/xfs/xfs_arch.h Sun May 28 21:04:47 2000
@@ -39,7 +39,11 @@
#include <linux/autoconf.h>
#include "xfs_types.h"
+#ifdef __KERNEL__
+#include <asm/byteorder.h>
+#else
#include <endian.h>
+#endif
/* sanity checks */
--- linux/fs/xfs/xfs_bmap_btree.h-o Sat May 27 12:15:24 2000
+++ linux/fs/xfs/xfs_bmap_btree.h Sun May 28 21:05:20 2000
@@ -35,7 +35,11 @@
#ident "$Revision: 1.47 $"
#include "xfs_buf.h"
+#ifdef __KERNEL__
+#include <asm/byteorder.h>
+#else
#include <endian.h>
+#endif
#define XFS_BMAP_MAGIC 0x424d4150 /* 'BMAP' */
|