Skip to content

Commit

Permalink
engine: platform: android: use RTLD_NOW in dlopen()
Browse files Browse the repository at this point in the history
We basically use RTLD_NOW everywhere in the engine these days,
only platform code is behind that
  • Loading branch information
a1batross committed Jul 9, 2024
1 parent 1b55104 commit 6728b84
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions engine/platform/android/lib_android.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 6728b84

Please sign in to comment.