summaryrefslogtreecommitdiff
path: root/base
diff options
context:
space:
mode:
authorLuis Hector Chavez <lhchavez@google.com>2016-07-27 11:38:30 -0700
committerLuis Hector Chavez <lhchavez@google.com>2016-07-27 11:38:30 -0700
commit64ff24167a7f57775a3d2135a87f3f5d4b11b763 (patch)
treeb72c7962a80dfcba0fc225a44095e1f7c18bbf93 /base
parent94a4612ef54a56ba1951720bced11678bcbd6068 (diff)
downloadlibchrome-64ff24167a7f57775a3d2135a87f3f5d4b11b763.tar.gz
libchrome: Second attempt at fixing Mac build
For reasons I have not yet understood, the Android buildbot fails to like the forward declarations. This second attempt at a fix keeps the code in Yosemite+ as-is and conditionally-omits it for previous versions. Change-Id: Ibdb52961f1ce33c24a0bdaf68a058bdb006f9333
Diffstat (limited to 'base')
-rw-r--r--base/sys_info_mac.mm7
1 files changed, 7 insertions, 0 deletions
diff --git a/base/sys_info_mac.mm b/base/sys_info_mac.mm
index a2903a27fc..102d99f3d0 100644
--- a/base/sys_info_mac.mm
+++ b/base/sys_info_mac.mm
@@ -39,6 +39,7 @@ std::string SysInfo::OperatingSystemVersion() {
void SysInfo::OperatingSystemVersionNumbers(int32_t* major_version,
int32_t* minor_version,
int32_t* bugfix_version) {
+#if defined(MAC_OS_X_VERSION_10_10)
NSProcessInfo* processInfo = [NSProcessInfo processInfo];
if ([processInfo respondsToSelector:@selector(operatingSystemVersion)]) {
NSOperatingSystemVersion version = [processInfo operatingSystemVersion];
@@ -46,6 +47,12 @@ void SysInfo::OperatingSystemVersionNumbers(int32_t* major_version,
*minor_version = version.minorVersion;
*bugfix_version = version.patchVersion;
} else {
+#else
+ // Android buildbots are too old and have trouble using the forward
+ // declarations for some reason. Conditionally-compile the above block
+ // only when building on a more modern version of OS X.
+ if (true) {
+#endif
// -[NSProcessInfo operatingSystemVersion] is documented available in 10.10.
// It's also available via a private API since 10.9.2. For the remaining
// cases in 10.9, rely on ::Gestalt(..). Since this code is only needed for