ntoskrnl: Fix cross-compilation of the driver tests.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Dmitry Timoshkov 2018-09-06 17:01:24 +08:00 committed by Alexandre Julliard
parent f141ed7a81
commit 8a20d6e83d
2 changed files with 9 additions and 2 deletions

View File

@ -75,8 +75,8 @@ static void WINAPIV ok_(const char *file, int line, int condition, const char *m
const char *current_file;
__ms_va_list args;
if (!(current_file = strrchr(file, '/')) &&
!(current_file = strrchr(file, '\\')))
if (!(current_file = drv_strrchr(file, '/')) &&
!(current_file = drv_strrchr(file, '\\')))
current_file = file;
else
current_file++;

View File

@ -35,3 +35,10 @@ struct test_input
int winetest_debug;
WCHAR path[1];
};
static inline char *drv_strrchr( const char *str, char ch )
{
char *ret = NULL;
do { if (*str == ch) ret = (char *)(ULONG_PTR)str; } while (*str++);
return ret;
}