fdt: Add INT32_MAX to kernel.h for libfdt
authorSimon Glass <sjg@chromium.org>
Sun, 27 Oct 2019 15:47:39 +0000 (09:47 -0600)
committerSimon Glass <sjg@chromium.org>
Tue, 5 Nov 2019 01:15:32 +0000 (18:15 -0700)
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>
include/linux/kernel.h
include/linux/libfdt_env.h

index a85c15d8dc28d31e7a1b7be06ac1b61d1f84f419..5c7e5f635b1a1e030907c2776a6254cad0c2682a 100644 (file)
@@ -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))
index e49fcd72bd60d3d54ab1314257c2e94ce2fbcc13..148b908e2ecc14c7b5a75331d2f51b8da7dbb2b5 100644 (file)
@@ -10,6 +10,7 @@
 #define LIBFDT_ENV_H
 
 #include <linux/string.h>
+#include <linux/kernel.h>
 
 #include <asm/byteorder.h>