diff --git a/src/opencl_wrapper.cpp b/src/opencl_wrapper.cpp index 756a70bc396069e75234245fa81d029b86dfc1a1..caf523f708398eff010307bd7f7a365bde2757cc 100644 --- a/src/opencl_wrapper.cpp +++ b/src/opencl_wrapper.cpp @@ -30,14 +30,15 @@ static const std::vector g_opencl_library_paths = { #if defined(__APPLE__) || defined(__MACOSX) "libOpenCL.so", "/System/Library/Frameworks/OpenCL.framework/OpenCL" #else + "/vendor/lib64/chipsetsdk/libGLES_mali.so", "/system/lib64/libGLES_mali.so", "libGLES_mali.so", #endif }; static std::mutex g_initMutex; -bool isInit = false; -void *handle_{nullptr}; +static bool isInit = false; +static void *handle_{nullptr}; bool InitOpenCL() { std::lock_guard lock(g_initMutex); @@ -49,6 +50,9 @@ bool InitOpenCL() { } bool UnLoadOpenCLLibrary(void *handle) { +#ifdef __MUSL__ + return true; +#else if (handle != nullptr) { if (dlclose(handle) != 0) { return false; @@ -56,6 +60,7 @@ bool UnLoadOpenCLLibrary(void *handle) { return true; } return true; +#endif } bool LoadLibraryFromPath(const std::string &library_path, void **handle_ptr) {