$OpenBSD$ --- source/qcommon/library.c.orig Tue Sep 27 09:23:31 2011 +++ source/qcommon/library.c Thu Aug 15 18:27:56 2013 @@ -236,9 +236,9 @@ void *Com_LoadGameLibrary( const char *basename, const gamelib->lib = NULL; gamelib->fullname = NULL; - libname_size = strlen( basename ) + 1 + strlen( ARCH ) + strlen( LIB_SUFFIX ) + 1; + libname_size = strlen( basename ) + 1 + strlen( LIB_SUFFIX ) + 1; libname = ( char* )Mem_TempMalloc( libname_size ); - Q_snprintfz( libname, libname_size, "%s_" ARCH LIB_SUFFIX, basename ); + Q_snprintfz( libname, libname_size, "%s" LIB_SUFFIX, basename ); // it exists? if( FS_FOpenFile( libname, NULL, FS_READ ) == -1 ) @@ -248,6 +248,16 @@ void *Com_LoadGameLibrary( const char *basename, const Mem_ZoneFree( gamelib ); return NULL; } + +#ifdef LIB_PATH + // do no check if the library is pure if it is in the compile-time lib path + if( pure ) + { + const char *fullname = FS_AbsoluteNameForFile( libname ); + if( fullname != NULL && strncmp(LIB_PATH, fullname, strlen(LIB_PATH)) == 0 ) + pure = qfalse; + } +#endif // pure check if( pure && !FS_IsPureFile( libname ) )