Evgeny Zinoviev has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/50412 )
Change subject: util/inteltool: Fix building with musl libc ......................................................................
util/inteltool: Fix building with musl libc
1. Make sure __always_inline is defined. 2. To test if we're on Linux, check presence of __linux__ instead of __GLIBC__.
Change-Id: I2ccfc4d2ef4c60877e24508f9926b533cffec0ed Signed-off-by: Evgeny Zinoviev me@ch1p.io --- M util/inteltool/inteltool.h 1 file changed, 5 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/12/50412/1
diff --git a/util/inteltool/inteltool.h b/util/inteltool/inteltool.h index a528485..c759abf 100644 --- a/util/inteltool/inteltool.h +++ b/util/inteltool/inteltool.h @@ -4,12 +4,15 @@ #ifndef INTELTOOL_H #define INTELTOOL_H 1
+#if defined(__linux__) +#include <linux/stddef.h> +#endif #include <arch/mmio.h> #include <commonlib/helpers.h>
#include <stdint.h>
-#if defined(__GLIBC__) +#if defined(__linux__) #include <sys/io.h> #endif #if (defined(__MACH__) && defined(__APPLE__)) @@ -17,6 +20,7 @@ #define __DARWIN__ #include <DirectHW/DirectHW.h> #endif + #ifdef __NetBSD__ #include <pciutils/pci.h> #else