Allow loading system OpenAL library on macOS again

In May 2017 the library loading was limited to *.dylib but the macOS
system OpenAL framework does not have dylib extension. So allow loading
files from /System/Library/Frameworks/ as libraries even without dylib
extension.

This is checked in Sys_DllExtension() so that QVM filesystem access will
not allow writing files to /System/Library/Frameworks/ even if homepath
is changed to include it. (Admittedly it doesn't fit the function name
but fits the function description and current usage.)
This commit is contained in:
Zack Middleton 2018-03-22 14:31:46 -05:00
parent 9465b445b0
commit 484149573b

View file

@ -928,6 +928,14 @@ qboolean Sys_DllExtension( const char *name ) {
return qtrue; return qtrue;
} }
#ifdef __APPLE__
// Allow system frameworks without dylib extensions
// i.e., /System/Library/Frameworks/OpenAL.framework/OpenAL
if ( strncmp( name, "/System/Library/Frameworks/", 27 ) == 0 ) {
return qtrue;
}
#endif
// Check for format of filename.so.1.2.3 // Check for format of filename.so.1.2.3
p = strstr( name, DLL_EXT "." ); p = strstr( name, DLL_EXT "." );