mirror of https://github.com/BOINC/boinc.git
Client: fix nvidia_driver_version dlopen()
On Debian only the versioned object can be opened. It usually is a symlink to the actual file.
This commit is contained in:
parent
2d5b8a246b
commit
dcd9eb3c2e
|
@ -105,8 +105,13 @@ static int nvidia_driver_version() {
|
|||
void *handle = NULL;
|
||||
char driver_string[81];
|
||||
|
||||
handle = dlopen("libnvidia-ml.so.1", RTLD_NOW);
|
||||
if (!handle) {
|
||||
handle = dlopen("libnvidia-ml.so", RTLD_NOW);
|
||||
if (!handle) goto end;
|
||||
if (!handle) {
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
nvml_driver = (int(*)(char *, unsigned int)) dlsym(handle, "nvmlSystemGetDriverVersion");
|
||||
nvml_init = (int(*)(void)) dlsym(handle, "nvmlInit");
|
||||
|
|
Loading…
Reference in New Issue