Mesa (7.8-gles): egl: Don' t try to load driver basename if the platform needs a suffix
Kristian Høgsberg
krh at kemper.freedesktop.org
Fri May 14 19:23:44 UTC 2010
Module: Mesa
Branch: 7.8-gles
Commit: b3e27bca9fae8a921ae049da2d865ff023b13ce1
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b3e27bca9fae8a921ae049da2d865ff023b13ce1
Author: Kristian Høgsberg <krh at bitplanet.net>
Date: Thu May 13 08:27:37 2010 -0400
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.
---
src/egl/main/egldriver.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/egl/main/egldriver.c b/src/egl/main/egldriver.c
index 6384242..0c69334 100644
--- a/src/egl/main/egldriver.c
+++ b/src/egl/main/egldriver.c
@@ -293,9 +293,9 @@ _eglLoaderFile(const char *dir, size_t len, void *loader_data)
len += flen;
path[len] = '\0';
- drv = _eglLoadDriver(path, NULL);
- /* fix the path and load again */
- if (!drv && library_suffix()) {
+ if (library_suffix() == NULL || strstr(path, library_suffix()))
+ drv = _eglLoadDriver(path, NULL);
+ else {
const char *suffix = library_suffix();
size_t slen = strlen(suffix);
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)) {
strcpy(path + len, suffix);
drv = _eglLoadDriver(path, NULL);
+ } else {
+ drv = NULL;
}
}
if (!drv)
More information about the mesa-commit
mailing list