add dlopen error info

This commit is contained in:
2026-04-06 23:40:36 +03:00
parent d8804c9ae2
commit e053d445da
2 changed files with 3 additions and 2 deletions

2
deps/Makefile vendored
View File

@@ -19,7 +19,7 @@ flatcc/bin/flatcc: flatcc
ptQueue: ptQueue:
@git clone ssh://git@git.nikto-b.ru:2223/nikto_b/ptQueue.git @git clone https://git.nikto-b.ru/nikto_b/ptQueue
ptQueue/out/ptQueue.a: ptQueue ptQueue/out/ptQueue.a: ptQueue
@make -C ptQueue @make -C ptQueue

View File

@@ -99,7 +99,8 @@ device_lib_t* loadDeviceLib(const char *libpath, char* errbuf)
void *handle = dlopen(libpath, RTLD_NOW); void *handle = dlopen(libpath, RTLD_NOW);
if (!handle) { if (!handle) {
snprintf(errbuf, 1024, "unable to open dl handle"); const char *dlerr = dlerror();
snprintf(errbuf, 1024, "unable to open dl handle: %s", dlerr);
free(dev); free(dev);
return NULL; return NULL;
} }