1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-04-27 07:02:34 +02:00

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 <aklm@chromium.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/67311
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Felix Singer <felixsinger@posteo.net>
Reviewed-by: Thomas Heijligen <src@posteo.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Anastasia Klimchuk 2022-09-02 17:17:35 +10:00 committed by Thomas Heijligen
parent 73c0a1d878
commit a30be92ff3

View File

@ -18,7 +18,9 @@
#include <include/test.h>
#include <string.h>
#if defined(__linux__) && !defined(__ANDROID__)
#include <linux/spi/spidev.h>
#endif
#include "tests.h"
#include "libflashrom.h"