engine: platform: android: use RTLD_NOW in dlopen()

We basically use RTLD_NOW everywhere in the engine these days,
only platform code is behind that
This commit is contained in:
Alibek Omarov 2024-07-09 16:50:35 +03:00
parent 1b55104d51
commit 6728b843f7
1 changed files with 4 additions and 4 deletions

View File

@ -35,24 +35,24 @@ void *ANDROID_LoadLibrary( const char *dllname )
continue;
Q_snprintf( path, MAX_SYSPATH, "%s/lib%s."OS_LIB_EXT, libdir[i], dllname );
pHandle = dlopen( path, RTLD_LAZY );
pHandle = dlopen( path, RTLD_NOW );
if( pHandle )
return pHandle;
COM_PushLibraryError( dlerror() );
}
// HACKHACK: keep old behaviour for compability
// HACKHACK: keep old behaviour for compatibility
if( Q_strstr( dllname, "." OS_LIB_EXT ) || Q_strstr( dllname, "/" ))
{
pHandle = dlopen( dllname, RTLD_LAZY );
pHandle = dlopen( dllname, RTLD_NOW );
if( pHandle )
return pHandle;
}
else
{
Q_snprintf( path, MAX_SYSPATH, "lib%s."OS_LIB_EXT, dllname );
pHandle = dlopen( path, RTLD_LAZY );
pHandle = dlopen( path, RTLD_NOW );
if( pHandle )
return pHandle;
}