From a30be92ff32832c416303a1bee39d3549f8b3b0c Mon Sep 17 00:00:00 2001 From: Anastasia Klimchuk Date: Fri, 2 Sep 2022 17:17:35 +1000 Subject: tests: Guard Linux-specific linux/spidev.h header file This allows unit tests to build on non-Linux platforms. BUG=b:237606255 TEST=unit tests compile on two environments: 1) FreeBSD 13.1-RELEASE-p2 GENERIC amd64 2) Debian 5.17.11 x86_64 GNU/Linux Change-Id: Icdb1b0cb29c5d62187153788ad5e0e631e8d0b62 TICKET: https://ticket.coreboot.org/issues/411 Signed-off-by: Anastasia Klimchuk Reviewed-on: https://review.coreboot.org/c/flashrom/+/67311 Reviewed-by: Angel Pons Reviewed-by: Felix Singer Reviewed-by: Thomas Heijligen Tested-by: build bot (Jenkins) --- tests/lifecycle.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tests') diff --git a/tests/lifecycle.h b/tests/lifecycle.h index 1379f7d77..69f111969 100644 --- a/tests/lifecycle.h +++ b/tests/lifecycle.h @@ -18,7 +18,9 @@ #include #include +#if defined(__linux__) && !defined(__ANDROID__) #include +#endif #include "tests.h" #include "libflashrom.h" -- cgit v1.2.3