[PATCH 15/18] stdint: Add a definition of UINT8_MAX

Simon Glass sjg at chromium.org
Mon Feb 28 20:08:32 CET 2022


This is normally defined in stdint.h but is not used in U-Boot. When
libraries (such as Chromium OS vboot) are built against U-Boot they may
expect this value to be available. Add it to avoid build errors in this
case.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

 include/stdint.h | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/include/stdint.h b/include/stdint.h
index 2e126d14bd..dea83c8226 100644
--- a/include/stdint.h
+++ b/include/stdint.h
@@ -5,3 +5,10 @@
  *
  * U-Boot uses linux types (linux/types.h) so does not make use of stdint.h
  */
+
+#ifndef __UB_STDINT_H
+#define __UB_STDINT_H
+
+#define UINT8_MAX	0xff
+
+#endif
-- 
2.35.1.574.g5d30c73bfb-goog



More information about the U-Boot mailing list