[PATCH] ntoskrnl.exe: Fix cross-compilation of the driver tests.
Dmitry Timoshkov
dmitry at baikal.ru
Thu Sep 6 04:01:24 CDT 2018
Signed-off-by: Dmitry Timoshkov <dmitry at baikal.ru>
---
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 d424396d4c..68b6730c9b 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 6a4179ed00..be4a9dc837 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;
+}
--
2.17.1
More information about the wine-devel
mailing list