diff --git a/loader/win32.c b/loader/win32.c index 30960eec99..1195361e43 100644 --- a/loader/win32.c +++ b/loader/win32.c @@ -47,7 +47,20 @@ #include #endif +#if HAVE_VSSCANF int vsscanf( const char *str, const char *format, va_list ap); +#else +/* system has no vsscanf. try to provide one */ +static int vsscanf( const char *str, const char *format, va_list ap) +{ + long p1 = va_arg(ap, long); + long p2 = va_arg(ap, long); + long p3 = va_arg(ap, long); + long p4 = va_arg(ap, long); + long p5 = va_arg(ap, long); + return sscanf(str, format, p1, p2, p3, p4, p5); +} +#endif char* def_path = WIN32_PATH;