From 81c3f31f90b33c993c106d4c0addabd4d2fdfe7a Mon Sep 17 00:00:00 2001 From: Thomas Heijligen Date: Mon, 15 May 2023 21:48:38 +0200 Subject: meson: Add support for ni845x_spi on Windows TEST=On MSYS32 MINGW32 with ni845x library installed: meson setup -Dprogrammer=ni845x_spi build meson compile -C build ./build/flashrom.exe lists the ni845x_spi as choice. Without ni845x library installed but ni845x_spi disabled, build succeeds on all platforms. Change-Id: I2d32f11852ac1a5184af8e8683ca1914a6e72973 Signed-off-by: Thomas Heijligen Signed-off-by: Peter Marheine Reviewed-on: https://review.coreboot.org/c/flashrom/+/75236 Reviewed-by: Anastasia Klimchuk Tested-by: build bot (Jenkins) --- ni845x_spi.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'ni845x_spi.c') diff --git a/ni845x_spi.c b/ni845x_spi.c index d4ae294c1..6e7bb769c 100644 --- a/ni845x_spi.c +++ b/ni845x_spi.c @@ -15,6 +15,13 @@ * */ +/* The ni845x header does need the WIN32 symbol to be defined and meson does not do it. + * Define it just here, since this driver will only work on 32-bit Windows. + */ +#ifndef WIN32 +#define WIN32 +#endif + #include #include #include -- cgit v1.2.3