This commit is contained in:
Vitor Santos Costa 2016-08-23 15:51:39 +01:00
parent 23c1c2d4d7
commit ba98f237ae

View File

@ -123,13 +123,7 @@ void *Yap_LoadForeignFile(char *file, int flags) {
else else
dlflag |= RTLD_LOCAL; dlflag |= RTLD_LOCAL;
#endif #endif
if (!Yap_findFile(file, NULL, NULL, LOCAL_FileNameBuf, true, YAP_OBJ, true, true)) { out = (void *)dlopen(file, dlflag);
/* use LD_LIBRARY_PATH */
strncpy(LOCAL_FileNameBuf, file, YAP_FILENAME_MAX - 1);
strncat(LOCAL_FileNameBuf, ".", YAP_FILENAME_MAX - 1);
strncat(LOCAL_FileNameBuf, "SO_EXT", YAP_FILENAME_MAX - 1);
}
out = (void *)dlopen(LOCAL_FileNameBuf, flags);
if (out == NULL) { if (out == NULL) {
const char *m_os = dlerror(); const char *m_os = dlerror();
if (m_os) { if (m_os) {