util/nvmutil: more reliable stdint.h check

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2026-03-10 08:26:20 +00:00
parent 2a20251ad6
commit edb1508a59
+9 -5
View File
@@ -34,16 +34,20 @@
#include <limits.h>
#include <stdarg.h>
#if defined(__has_include)
#if __has_include(<stdint.h>)
#include <stdint.h>
# if __has_include(<stdint.h>)
# include <stdint.h>
# else
typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef unsigned int uint32_t;
# endif
#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
# include <stdint.h>
#else
typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef unsigned int uint32_t;
#endif
#else
#include <stdint.h>
#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>