am e109930e: am dc77a228: Merge "Allow dlopen("egl/blah.so")."

* commit 'e109930e9fd0922280e6f74b3df270093ee95fa6':
  Allow dlopen("egl/blah.so").
This commit is contained in:
Elliott Hughes 2012-11-01 23:10:56 -07:00 committed by Android Git Automerger
commit eb15e1d485

View File

@ -634,7 +634,11 @@ static int open_library(const char* name) {
// If the name contains a slash, we should attempt to open it directly and not search the paths.
if (strchr(name, '/') != NULL) {
return TEMP_FAILURE_RETRY(open(name, O_RDONLY | O_CLOEXEC));
int fd = TEMP_FAILURE_RETRY(open(name, O_RDONLY | O_CLOEXEC));
if (fd != -1) {
return fd;
}
// ...but nvidia binary blobs (at least) rely on this behavior, so fall through for now.
}
// Otherwise we try LD_LIBRARY_PATH first, and fall back to the built-in well known paths.