Subject: Re: linux-next: build warning in Linus'tree

From: Andrew Morton <[email-masked]>
Date: Tue, 25 May 2010 18:20:40 -0700

On Wed, 26 May 2010 11:05:06 +1000 Stephen Rothwell <[email-masked]> wrote:

> Hi Linus,
> 
> Today's linux-next build (powerpc ppc64_defconfig) produced this warning:
> 
> lib/crc32.c:53:22: warning: "__LITTLE_ENDIAN" is not defined
> lib/crc32.c:53:22: warning: "__LITTLE_ENDIAN" is not defined
> In file included from fs/jfs/jfs_types.h:33,
>                  from fs/jfs/jfs_incore.h:26,
>                  from fs/jfs/file.c:22:
> fs/jfs/endian24.h:36:101: warning: "__LITTLE_ENDIAN" is not defined
> 
> and more of the same ...
> 
> Introduced by commit 4762bbc1a3a1f22095278b74dd1b8cee04858641 ("crc32:
> use __BYTE_ORDER macro for endian detection") and (probably) commit b3b77c8caef1750ebeea1054e39e358550ea9f55 ("endian: #define __BYTE_ORDER").
> 

hmpf.  Does this fix?

--- a/lib/crc32.c~a
+++ a/lib/crc32.c
@@ -26,6 +26,7 @@
 #include <linux/compiler.h>
 #include <linux/types.h>
 #include <linux/init.h>
+#include <asm/byteorder.h>
 #include <asm/atomic.h>
 #include "crc32defs.h"
 #if CRC_LE_BITS == 8
_