aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2019-10-27 09:47:39 -0600
committerSimon Glass <sjg@chromium.org>2019-11-04 18:15:32 -0700
commit865989535038a2e5d11a18f2c3a67974f8328aee (patch)
tree3fd53f2e6abb869423c5af1c422960f19709d8d7
parent73b6e6ad254b36763419cdd3fdf406c0094517b7 (diff)
downloadu-boot-865989535038a2e5d11a18f2c3a67974f8328aee.zip
u-boot-865989535038a2e5d11a18f2c3a67974f8328aee.tar.gz
u-boot-865989535038a2e5d11a18f2c3a67974f8328aee.tar.bz2
fdt: Add INT32_MAX to kernel.h for libfdt
Unfortunately libfdt needs this value now, which is present in the stdint.h header. That file is just a placeholder in U-Boot and these sorts of constants appear in the linux/kernel.h header instead. To keep libfdt happy, add INT32_MAX too. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
-rw-r--r--include/linux/kernel.h2
-rw-r--r--include/linux/libfdt_env.h1
2 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index a85c15d..5c7e5f6 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -37,6 +37,8 @@
#define UINT32_MAX U32_MAX
#define UINT64_MAX U64_MAX
+#define INT32_MAX S32_MAX
+
#define STACK_MAGIC 0xdeadbeef
#define REPEAT_BYTE(x) ((~0ul / 0xff) * (x))
diff --git a/include/linux/libfdt_env.h b/include/linux/libfdt_env.h
index e49fcd7..148b908 100644
--- a/include/linux/libfdt_env.h
+++ b/include/linux/libfdt_env.h
@@ -10,6 +10,7 @@
#define LIBFDT_ENV_H
#include <linux/string.h>
+#include <linux/kernel.h>
#include <asm/byteorder.h>