aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPali Rohár <pali@kernel.org>2021-12-26 22:11:22 +0100
committerMartin Mares <mj@ucw.cz>2022-02-10 12:58:17 +0100
commit777029819b21c0260a3b766e3bad531d9fb4340b (patch)
treee8b04e3f3230f16326c20658f9ca62be379ab461
parent4e6fd387fe9444fb6872b1ab106a194c5edf3618 (diff)
downloadpciutils-777029819b21c0260a3b766e3bad531d9fb4340b.tar.gz
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.
-rw-r--r--lib/sysdep.h1
1 files changed, 1 insertions, 0 deletions
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