From: Pali Rohár Date: Sun, 27 Feb 2022 19:02:37 +0000 (+0100) Subject: libpci: i386-io-windows.h: Fix MinGW build with pre-4.00 MSVCRT runtime library X-Git-Tag: v3.8.0~12 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=49b93c5dd9f8ae21533cb0418850a70c12721bf3;p=pciutils.git 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. --- 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) {