diff options
author | Kristian Høgsberg <krh@bitplanet.net> | 2010-05-13 08:27:37 -0400 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2010-05-13 08:28:45 -0400 |
commit | 41797e16599304e9e300e60c54f7d9457ff2b848 (patch) | |
tree | d9048581e4443185c3766c438b99fa380ea2f39f | |
parent | 8230ead0cfb3fdfff3f3755e9850a60b5fd271bc (diff) |
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.
-rw-r--r-- | 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 052e6110bfb..28649563a4d 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) |