diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-03-10 08:26:20 +0000 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-03-10 08:26:20 +0000 |
| commit | edb1508a5913d4d7c359da5b0408f5c5de6895d4 (patch) | |
| tree | c3aaa6a15a1c0527ab6cdf0b749545bd407125eb /util/nvmutil | |
| parent | 2a20251ad620d6604e55b28c824e77b1242ba6b1 (diff) | |
util/nvmutil: more reliable stdint.h check
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util/nvmutil')
| -rw-r--r-- | util/nvmutil/nvmutil.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c index e281f4ef..d1786571 100644 --- a/util/nvmutil/nvmutil.c +++ b/util/nvmutil/nvmutil.c @@ -34,15 +34,19 @@ #include <limits.h> #include <stdarg.h> #if defined(__has_include) -#if __has_include(<stdint.h>) -#include <stdint.h> -#else +# 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 +# endif +#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +# include <stdint.h> #else -#include <stdint.h> +typedef unsigned char uint8_t; +typedef unsigned short uint16_t; +typedef unsigned int uint32_t; #endif #include <stdio.h> #include <stdlib.h> |
