util/nvmutil: assert uint16_t as 16-bits

some platforms might get this wrong. define it
explicitly.

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2026-03-09 16:43:54 +00:00
parent afebfe7389
commit d3b567edcf
+6
View File
@@ -38,6 +38,12 @@
#include <string.h>
#include <unistd.h>
#if __STDC_VERSION__ >= 201112L
_Static_assert(sizeof(uint16_t) == 2, "uint16_t must be 16 bits");
#else
typedef char static_assert_uint16_t_is_2[(sizeof(uint16_t) == 2) ? 1 : -1];
#endif
/*
* The BSD versions that could realistically build
* nvmutil almost certainly have arc4random (first