diff options
author | Pali Rohár <pali@kernel.org> | 2021-12-26 22:11:22 +0100 |
---|---|---|
committer | Martin Mares <mj@ucw.cz> | 2022-02-10 12:58:17 +0100 |
commit | 777029819b21c0260a3b766e3bad531d9fb4340b (patch) | |
tree | e8b04e3f3230f16326c20658f9ca62be379ab461 | |
parent | 4e6fd387fe9444fb6872b1ab106a194c5edf3618 (diff) | |
download | pciutils-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.h | 1 |
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 |