diff options
Diffstat (limited to 'payloads/libpayload/drivers')
-rw-r--r-- | payloads/libpayload/drivers/options.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/payloads/libpayload/drivers/options.c b/payloads/libpayload/drivers/options.c index 9e437f93f0..b6d234222d 100644 --- a/payloads/libpayload/drivers/options.c +++ b/payloads/libpayload/drivers/options.c @@ -26,8 +26,11 @@ * SUCH DAMAGE. */ +#define __STDC_FORMAT_MACROS + #include <libpayload.h> #include <coreboot_tables.h> +#include <inttypes.h> u8 *mem_accessor_base; @@ -325,7 +328,7 @@ int get_option_as_string(const struct nvram_accessor *nvram, struct cb_cmos_opti /* only works on little endian. 26 bytes is enough for a 64bit value in decimal */ *dest = malloc(26); - sprintf(*dest, "%llu", *(u64*)raw); + sprintf(*dest, "%" PRIu64, *(u64 *)raw); break; case 's': *dest = strdup(raw); |