summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Rex <julian.rex@mapbox.com>2019-10-07 15:42:27 -0400
committerJulian Rex <julian.rex@mapbox.com>2019-10-07 15:42:27 -0400
commitca33b691ad89ced1c4706c8b961bbdcef61b8175 (patch)
treec12ec9ebe4f2851ef93fe084ade7cbae00514a2a
parent1d57c5e838460945c848f94ee97e3b123dc0ff9c (diff)
downloadqtlocation-mapboxgl-upstream/jrex/fix-ios9-sdk-metrics-manager-crash.tar.gz
[ios, macos] Add #if around new function.upstream/jrex/fix-ios9-sdk-metrics-manager-crash
-rw-r--r--platform/darwin/src/MGLSDKMetricsManager.m2
1 files changed, 2 insertions, 0 deletions
diff --git a/platform/darwin/src/MGLSDKMetricsManager.m b/platform/darwin/src/MGLSDKMetricsManager.m
index 664bc373e4..0ef9ecda10 100644
--- a/platform/darwin/src/MGLSDKMetricsManager.m
+++ b/platform/darwin/src/MGLSDKMetricsManager.m
@@ -19,6 +19,7 @@ NSString* MGLStringFromMetricType(MGLMetricType metricType) {
}
// Taken verbatim from NXFreeArchInfo header documentation
+#if TARGET_OS_IOS
static void MGLFreeArchInfo(const NXArchInfo *x)
{
const NXArchInfo *p;
@@ -32,6 +33,7 @@ static void MGLFreeArchInfo(const NXArchInfo *x)
free((char *)x->description);
free((NXArchInfo *)x);
}
+#endif
@interface MGLMetricsManager() <MGLNetworkConfigurationMetricsDelegate>