summaryrefslogtreecommitdiffstats
path: root/ni845x_spi.c
diff options
context:
space:
mode:
authorThomas Heijligen <thomas.heijligen@secunet.com>2023-05-15 21:48:38 +0200
committerAnastasia Klimchuk <aklm@chromium.org>2023-07-13 09:29:14 +0000
commit81c3f31f90b33c993c106d4c0addabd4d2fdfe7a (patch)
tree022ef1e3b3af7d3b3f83ca2decefbde39080f39f /ni845x_spi.c
parent7538b74a11a81afb352b78a829badf4673afd4ae (diff)
downloadflashrom-81c3f31f90b33c993c106d4c0addabd4d2fdfe7a.tar.gz
flashrom-81c3f31f90b33c993c106d4c0addabd4d2fdfe7a.tar.bz2
flashrom-81c3f31f90b33c993c106d4c0addabd4d2fdfe7a.zip
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 <thomas.heijligen@secunet.com> Signed-off-by: Peter Marheine <pmarheine@chromium.org> Reviewed-on: https://review.coreboot.org/c/flashrom/+/75236 Reviewed-by: Anastasia Klimchuk <aklm@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'ni845x_spi.c')
-rw-r--r--ni845x_spi.c7
1 files changed, 7 insertions, 0 deletions
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 <ctype.h>
#include <inttypes.h>
#include <string.h>