Julius Werner has submitted this change. ( https://review.coreboot.org/c/coreboot/+/83907?usp=email )
Change subject: libpayload: Add missing SIZE_MAX define ......................................................................
libpayload: Add missing SIZE_MAX define
commonlib/region.h requires SIZE_MAX to be defined.
Change-Id: I588d59c2637b10def046ea02293e5503c9b6bc3d Signed-off-by: Jakub Czapiga czapiga@google.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/83907 Reviewed-by: Subrata Banik subratabanik@google.com Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Julius Werner jwerner@chromium.org Reviewed-by: Eric Lai ericllai@google.com --- M payloads/libpayload/include/stdint.h 1 file changed, 8 insertions(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Subrata Banik: Looks good to me, approved Julius Werner: Looks good to me, approved Eric Lai: Looks good to me, but someone else must approve
diff --git a/payloads/libpayload/include/stdint.h b/payloads/libpayload/include/stdint.h index 3cb494a..e455612 100644 --- a/payloads/libpayload/include/stdint.h +++ b/payloads/libpayload/include/stdint.h @@ -54,4 +54,12 @@ #define UINT32_MAX (4294967295U) #define UINT64_MAX (18446744073709551615ULL)
+#ifndef SIZE_MAX +#ifdef __SIZE_MAX__ +#define SIZE_MAX __SIZE_MAX__ +#else +#define SIZE_MAX (~(size_t)0) +#endif /* __SIZE_MAX__ */ +#endif /* SIZE_MAX */ + #endif