Anastasia Klimchuk has uploaded this change for review.
tests: Guard sys/io.h the same as in hwaccess_x86_io.h
Inclusion of this header in hwaccess_x86_io.h is guarded by
`defined(__linux__) || defined(__GLIBC__)` , in addition to that
inclusion of hwaccess_x86_io.h into hwaccess.h is guarded by
IS_X86. Combining these two together, this patch adds the same
guards for unittest header file, so that test build don't break
on non-x86.
BUG=b:181803212
TEST=builds and ninja test on x86
Change-Id: I3f2f0408be7c00f954b899031b52b2b97ef19ca3
Signed-off-by: Anastasia Klimchuk <aklm@chromium.org>
---
M hwaccess_x86_io_unittest.h
1 file changed, 2 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/41/55741/1
diff --git a/hwaccess_x86_io_unittest.h b/hwaccess_x86_io_unittest.h
index 7bffc96..67a92e6 100644
--- a/hwaccess_x86_io_unittest.h
+++ b/hwaccess_x86_io_unittest.h
@@ -38,7 +38,9 @@
#define INL(p) test_inl(p)
#include <stdint.h>
+#if IS_X86 && defined(__linux__) || defined(__GLIBC__)
#include <sys/io.h>
+#endif
/* All functions below are mocked in unit tests. */
To view, visit change 55741. To unsubscribe, or for help writing mail filters, visit settings.