egl: Don't try to load driver basename if the platform needs a suffix
That is, don't dlopen(egl_glx) when we know we need to append .so.
This commit is contained in:
@@ -293,9 +293,9 @@ _eglLoaderFile(const char *dir, size_t len, void *loader_data)
|
|||||||
len += flen;
|
len += flen;
|
||||||
path[len] = '\0';
|
path[len] = '\0';
|
||||||
|
|
||||||
drv = _eglLoadDriver(path, NULL);
|
if (library_suffix() == NULL || strstr(path, library_suffix()))
|
||||||
/* fix the path and load again */
|
drv = _eglLoadDriver(path, NULL);
|
||||||
if (!drv && library_suffix()) {
|
else {
|
||||||
const char *suffix = library_suffix();
|
const char *suffix = library_suffix();
|
||||||
size_t slen = strlen(suffix);
|
size_t slen = strlen(suffix);
|
||||||
const char *p;
|
const char *p;
|
||||||
@@ -306,6 +306,8 @@ _eglLoaderFile(const char *dir, size_t len, void *loader_data)
|
|||||||
if (need_suffix && len + slen + 1 <= sizeof(path)) {
|
if (need_suffix && len + slen + 1 <= sizeof(path)) {
|
||||||
strcpy(path + len, suffix);
|
strcpy(path + len, suffix);
|
||||||
drv = _eglLoadDriver(path, NULL);
|
drv = _eglLoadDriver(path, NULL);
|
||||||
|
} else {
|
||||||
|
drv = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!drv)
|
if (!drv)
|
||||||
|
Reference in New Issue
Block a user