mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-11 14:02:52 +02:00
util/nvmutil: more reliable stdint.h check
Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user