diff --git a/src/common/os.h b/src/common/os.h index e3b6c455b..df52708d6 100644 --- a/src/common/os.h +++ b/src/common/os.h @@ -77,12 +77,6 @@ typedef _fsize_t ssize_t; # define LLD "%I64d" # define LLU "%I64u" -# if defined(COMP_MSC) -# include -int MTX_DLL_API vsscanf(const char *, const char *, va_list argPtr); -# endif // COMP_MSC - - #else // COMP_MINGW || COMP_MSC # define MTX_DLL_API @@ -119,4 +113,10 @@ typedef UINT64_TYPE uint64_t; # define ARCH_LITTLEENDIAN #endif +// MSVC doesn't provide vsscanf. So let's use our own frontend. +#if !defined(HAVE_VSSCANF) || (HAVE_VSSCANF != 1) +# include +int vsscanf(const char *, const char *, va_list); +#endif // !HAVE_VSSCANF... + #endif