Fix max build.

Test: Built properly.
Change-Id: I37b8ac7d42653617be6611b640a883066257214c
diff --git a/benchmarks/util.cpp b/benchmarks/util.cpp
index 31d7e04..91cdf7d 100644
--- a/benchmarks/util.cpp
+++ b/benchmarks/util.cpp
@@ -55,6 +55,15 @@
   return buf_aligned;
 }
 
+#if defined(__APPLE_)
+
+// Darwin doesn't support this, so do nothing.
+bool LockToCPU(int) {
+  return false;
+}
+
+#else
+
 bool LockToCPU(int cpu_to_lock) {
   cpu_set_t cpuset;
 
@@ -90,3 +99,5 @@
 
   return true;
 }
+
+#endif