coda: fix build using bare-metal toolchain [Linux 4.14.137]

This Linux kernel change "coda: fix build using bare-metal toolchain" is included in the Linux 4.14.137 release. This change is authored by Sam Protsenko <semen.protsenko [at] linaro.org> on Tue Jul 16 16:28:20 2019 -0700. The commit for this change in Linux stable tree is 49df626 (patch) which is from upstream commit b2a57e3. The same Linux upstream change may have been applied to various maintained Linux releases and you can find all Linux releases containing changes from upstream b2a57e3.

coda: fix build using bare-metal toolchain

[ Upstream commit b2a57e334086602be56b74958d9f29b955cd157f ]

The kernel is self-contained project and can be built with bare-metal
toolchain.  But bare-metal toolchain doesn't define __linux__.  Because
of this u_quad_t type is not defined when using bare-metal toolchain and
codafs build fails.  This patch fixes it by defining u_quad_t type
unconditionally.

Link: http://lkml.kernel.org/r/3[email protected]cs.cmu.edu
Signed-off-by: Sam Protsenko <[email protected]>
Signed-off-by: Jan Harkes <[email protected]>
Cc: Arnd Bergmann <[email protected]>
Cc: Colin Ian King <[email protected]>
Cc: Dan Carpenter <[email protected]>
Cc: David Howells <[email protected]>
Cc: Fabian Frederick <[email protected]>
Cc: Mikko Rapeli <[email protected]>
Cc: Yann Droneaud <[email protected]>
Cc: Zhouyang Jia <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>

There are 3 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 include/linux/coda.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/include/linux/coda.h b/include/linux/coda.h
index d30209b..0ca0c83 100644
--- a/include/linux/coda.h
+++ b/include/linux/coda.h
@@ -58,8 +58,7 @@
 #ifndef _CODA_HEADER_
 #define _CODA_HEADER_

-#if defined(__linux__)
 typedef unsigned long long u_quad_t;
-#endif
+
 #include <uapi/linux/coda.h>
 #endif 

Leave a Reply

Your email address will not be published. Required fields are marked *