From 777029819b21c0260a3b766e3bad531d9fb4340b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Pali=20Roh=C3=A1r?= Date: Sun, 26 Dec 2021 22:11:22 +0100 Subject: [PATCH] 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. --- lib/sysdep.h | 1 + 1 file changed, 1 insertion(+) 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 -- 2.39.2