From: Pali Rohár Date: Sun, 26 Dec 2021 21:11:22 +0000 (+0100) Subject: libpci: For PCI_OS_WINDOWS define strncasecmp as alias for _strnicmp X-Git-Tag: v3.8.0~51 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=777029819b21c0260a3b766e3bad531d9fb4340b;p=pciutils.git libpci: For PCI_OS_WINDOWS define strncasecmp as alias for _strnicmp CRTDLL, MSVCRT and UCRT runtimes provides strncasecmp()-like functionality in _strnicmp() function. As opposite of strcasecmp() for which there are _stricmp() and _strcmpi() variants, for strncasecmp() there is only _strnicmp() function. Without this change linking final setpci.exe executable undef MSVC fails. --- diff --git a/lib/sysdep.h b/lib/sysdep.h index 1986d9f..bdeb34a 100644 --- a/lib/sysdep.h +++ b/lib/sysdep.h @@ -22,6 +22,7 @@ typedef u16 word; #ifdef PCI_OS_WINDOWS #define strcasecmp _strcmpi +#define strncasecmp _strnicmp #if defined(_MSC_VER) && _MSC_VER < 1900 #define snprintf _snprintf #define vsnprintf _vsnprintf