diff --git a/Source/NSLock.m b/Source/NSLock.m index e55a8d0786..30fc4246bd 100644 --- a/Source/NSLock.m +++ b/Source/NSLock.m @@ -36,13 +36,14 @@ #import "GSPrivate.h" #import "GSPThread.h" #include +#include #import "common.h" #import "Foundation/NSLock.h" #import "Foundation/NSException.h" #import "Foundation/NSThread.h" -#import "Foundation/NSUserDefaults.h" +// #import "Foundation/NSUserDefaults.h" #define class_createInstance(C,E) NSAllocateObject(C,E,NSDefaultMallocZone()) @@ -348,7 +349,7 @@ + (void) initialize untracedConditionLockClass = [GSUntracedConditionLock class]; untracedLockClass = [GSUntracedLock class]; untracedRecursiveLockClass = [GSUntracedRecursiveLock class]; - compatible = [[NSUserDefaults standardUserDefaults] boolForKey: @"GSMacOSXCompatible"]; + compatible = (strcmp(getenv("NSLOCK_COMPATIBLE"), "YES") == 0) ? YES : NO; } }