mirror of
https://github.com/intel/llvm.git
synced 2026-02-03 10:39:35 +08:00
Fix lldb build on older OSX versions after svn commit r244716
Older OSX versions don't define NSOperatingSystemVersion, so building lldb gets: error: unknown type name 'NSOperatingSystemVersion' This patch fixes the build by having GetOSVersionNumbers return false if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101000, causing lldb to behave the same as it did before the commit. Reviewed by: jasonmolenda Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D12396 llvm-svn: 246138
This commit is contained in:
@@ -2027,6 +2027,7 @@ MachProcess::GetOSVersionNumbers (uint64_t *major, uint64_t *minor, uint64_t *pa
|
||||
{
|
||||
bool success = false;
|
||||
|
||||
#if (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101000)
|
||||
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
||||
|
||||
NSOperatingSystemVersion vers = [[NSProcessInfo processInfo] operatingSystemVersion];
|
||||
@@ -2040,6 +2041,7 @@ MachProcess::GetOSVersionNumbers (uint64_t *major, uint64_t *minor, uint64_t *pa
|
||||
success = true;
|
||||
|
||||
[pool drain];
|
||||
#endif
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user