mirror of https://github.com/BOINC/boinc.git
Merge pull request #1522 from BOINC/nvidia_version-fix
Client: fix nvidia_driver_version dlopen()
This commit is contained in:
commit
a2a1ee720d
|
@ -105,8 +105,13 @@ static int nvidia_driver_version() {
|
||||||
void *handle = NULL;
|
void *handle = NULL;
|
||||||
char driver_string[81];
|
char driver_string[81];
|
||||||
|
|
||||||
handle = dlopen("libnvidia-ml.so", RTLD_NOW);
|
handle = dlopen("libnvidia-ml.so.1", RTLD_NOW);
|
||||||
if (!handle) goto end;
|
if (!handle) {
|
||||||
|
handle = dlopen("libnvidia-ml.so", RTLD_NOW);
|
||||||
|
if (!handle) {
|
||||||
|
goto end;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
nvml_driver = (int(*)(char *, unsigned int)) dlsym(handle, "nvmlSystemGetDriverVersion");
|
nvml_driver = (int(*)(char *, unsigned int)) dlsym(handle, "nvmlSystemGetDriverVersion");
|
||||||
nvml_init = (int(*)(void)) dlsym(handle, "nvmlInit");
|
nvml_init = (int(*)(void)) dlsym(handle, "nvmlInit");
|
||||||
|
|
Loading…
Reference in New Issue