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>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/50412
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
This commit is contained in:
Evgeny Zinoviev 2021-02-09 03:38:50 +03:00 committed by Stefan Reinauer
parent ac0e7448e4
commit 88a54db592
1 changed files with 4 additions and 0 deletions

View File

@ -4,6 +4,9 @@
#ifndef INTELTOOL_H #ifndef INTELTOOL_H
#define INTELTOOL_H 1 #define INTELTOOL_H 1
#if defined(__linux__)
#include <linux/stddef.h>
#endif
#include <arch/mmio.h> #include <arch/mmio.h>
#include <commonlib/helpers.h> #include <commonlib/helpers.h>
@ -17,6 +20,7 @@
#define __DARWIN__ #define __DARWIN__
#include <DirectHW/DirectHW.h> #include <DirectHW/DirectHW.h>
#endif #endif
#ifdef __NetBSD__ #ifdef __NetBSD__
#include <pciutils/pci.h> #include <pciutils/pci.h>
#else #else