Module: wine Branch: master Commit: 8a20d6e83d55f9b9d77567d4f97e54cb5ddd5a52 URL: https://source.winehq.org/git/wine.git/?a=commit;h=8a20d6e83d55f9b9d77567d4f...
Author: Dmitry Timoshkov dmitry@baikal.ru Date: Thu Sep 6 17:01:24 2018 +0800
ntoskrnl: Fix cross-compilation of the driver tests.
Signed-off-by: Dmitry Timoshkov dmitry@baikal.ru Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/ntoskrnl.exe/tests/driver.c | 4 ++-- dlls/ntoskrnl.exe/tests/driver.h | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/dlls/ntoskrnl.exe/tests/driver.c b/dlls/ntoskrnl.exe/tests/driver.c index d424396..68b6730 100644 --- a/dlls/ntoskrnl.exe/tests/driver.c +++ b/dlls/ntoskrnl.exe/tests/driver.c @@ -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++; diff --git a/dlls/ntoskrnl.exe/tests/driver.h b/dlls/ntoskrnl.exe/tests/driver.h index 6a4179e..be4a9dc 100644 --- a/dlls/ntoskrnl.exe/tests/driver.h +++ b/dlls/ntoskrnl.exe/tests/driver.h @@ -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; +}