summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2014-11-24 21:18:21 -0700
committerSimon Glass <sjg@chromium.org>2014-11-25 06:33:58 -0700
commit803f2eb2a29cbde53d8baac4f6e6bef260fd0774 (patch)
tree6bce2afb99423c0488d52a892656ab32e4b2658d
parent2f6d42b9dfc5fb40ad59c5e81dab6298a192452b (diff)
downloadu-boot-imx-803f2eb2a29cbde53d8baac4f6e6bef260fd0774.zip
u-boot-imx-803f2eb2a29cbde53d8baac4f6e6bef260fd0774.tar.gz
u-boot-imx-803f2eb2a29cbde53d8baac4f6e6bef260fd0774.tar.bz2
Fix SIZE_MAX compiler warning when using stdint.h
This new symbol may be defined by the compiler. If it is, avoid a compiler warning when USE_STDINT is defined. Signed-off-by: Simon Glass <sjg@chromium.org>
-rw-r--r--include/linux/kernel.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index 89fcae0..0b61671 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -16,7 +16,9 @@
#define LLONG_MAX ((long long)(~0ULL>>1))
#define LLONG_MIN (-LLONG_MAX - 1)
#define ULLONG_MAX (~0ULL)
+#ifndef SIZE_MAX
#define SIZE_MAX (~(size_t)0)
+#endif
#define U8_MAX ((u8)~0U)
#define S8_MAX ((s8)(U8_MAX>>1))