From 3b50ca0ff8794d5b1eb9d0d8591234f927461463 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Fri, 25 Nov 2022 10:14:03 +0100 Subject: [PATCH] opencl: Use the Unix call helpers. --- dlls/opencl/opencl_private.h | 4 +--- dlls/opencl/pe_wrappers.c | 5 +---- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/dlls/opencl/opencl_private.h b/dlls/opencl/opencl_private.h index 4c582093b6d..28968296221 100644 --- a/dlls/opencl/opencl_private.h +++ b/dlls/opencl/opencl_private.h @@ -33,8 +33,6 @@ BOOL extension_is_supported( const char *name, size_t len ) DECLSPEC_HIDDEN; -extern unixlib_handle_t opencl_handle DECLSPEC_HIDDEN; - -#define OPENCL_CALL( func, params ) __wine_unix_call( opencl_handle, unix_ ## func, params ) +#define OPENCL_CALL( func, params ) WINE_UNIX_CALL( unix_ ## func, params ) #endif diff --git a/dlls/opencl/pe_wrappers.c b/dlls/opencl/pe_wrappers.c index 29ae1afaaff..3b6846009c1 100644 --- a/dlls/opencl/pe_wrappers.c +++ b/dlls/opencl/pe_wrappers.c @@ -25,8 +25,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(opencl); -unixlib_handle_t opencl_handle = 0; - static cl_int filter_extensions( const char *unix_exts, SIZE_T size, char *win_exts, size_t *ret_size ) { char *p = win_exts; @@ -284,8 +282,7 @@ BOOL WINAPI DllMain( HINSTANCE instance, DWORD reason, void *reserved ) if (reason == DLL_PROCESS_ATTACH) { DisableThreadLibraryCalls( instance ); - return !NtQueryVirtualMemory( GetCurrentProcess(), instance, MemoryWineUnixFuncs, - &opencl_handle, sizeof(opencl_handle), NULL ); + return !__wine_init_unix_call(); } return TRUE; }