Fix CPU-only build under Android Termux enviornment.

Update gpu.go initGPUHandles() to declare gpuHandles variable before
reading it. This resolves an "invalid memory address or nil pointer
dereference" error.

Update dyn_ext_server.c to avoid setting the RTLD_DEEPBIND flag under
__TERMUX__ (Android).
This commit is contained in:
Self Denial
2024-01-15 02:37:44 -07:00
parent d017e3d0a6
commit eb76f3e379
2 changed files with 2 additions and 2 deletions

View File

@@ -3,7 +3,7 @@
#include <stdio.h>
#include <string.h>
#ifdef __linux__
#if defined(__linux__) && !defined(__TERMUX__)
#include <dlfcn.h>
#define LOAD_LIBRARY(lib, flags) dlopen(lib, flags)
#define LOAD_SYMBOL(handle, sym) dlsym(handle, sym)