From 49b93c5dd9f8ae21533cb0418850a70c12721bf3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Pali=20Roh=C3=A1r?= Date: Sun, 27 Feb 2022 20:02:37 +0100 Subject: [PATCH] libpci: i386-io-windows.h: Fix MinGW build with pre-4.00 MSVCRT runtime library Like CRTDLL library, pre-4.00 MSVCRT runtime library does not provide I/O port functions. --- lib/i386-io-windows.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/i386-io-windows.h b/lib/i386-io-windows.h index 9cd9cd9..e32ecb2 100644 --- a/lib/i386-io-windows.h +++ b/lib/i386-io-windows.h @@ -35,11 +35,11 @@ #define _inp(x) __inbyte(x) #define _inpw(x) __inword(x) #define _inpd(x) __indword(x) -#elif defined(__CRTDLL__) +#elif defined(__CRTDLL__) || (defined(__MSVCRT_VERSION__) && __MSVCRT_VERSION__ < 0x400) /* - * Old 32-bit CRTDLL library does not provide I/O port functions. As this - * library exists only in 32-bit mode variant, implement I/O port functions - * via 32-bit inline assembly. + * Old 32-bit CRTDLL library and pre-4.00 MSVCRT library do not provide I/O + * port functions. As these libraries exist only in 32-bit mode variant, + * implement I/O port functions via 32-bit inline assembly. */ static inline int _outp(unsigned short port, int databyte) { -- 2.39.5