Make folly/future portable on android
authorFrancis Ma <fma@fb.com>
Fri, 5 Feb 2016 22:42:28 +0000 (14:42 -0800)
committerfacebook-github-bot-0 <folly-bot@fb.com>
Fri, 5 Feb 2016 23:20:24 +0000 (15:20 -0800)
Summary: Some small changes to port folly/futures onto android

Reviewed By: mzlee

Differential Revision: D2787564

fb-gh-sync-id: 8c161942c24c2b7b0484339eaa51c5a356f17de5

folly/detail/CacheLocality.cpp

index f9e4609f5877afc87aed3c9894b9f8766bb1ddb7..ff3937c223f599ddb98c966aa8c25bca80227a8f 100644 (file)
@@ -206,7 +206,7 @@ CacheLocality CacheLocality::uniform(size_t numCpus) {
 /// Resolves the dynamically loaded symbol __vdso_getcpu, returning null
 /// on failure
 static Getcpu::Func loadVdsoGetcpu() {
-#ifdef _MSC_VER
+#if defined(_MSC_VER) || defined(__BIONIC__)
   return nullptr;
 #else
   void* h = dlopen("linux-vdso.so.1", RTLD_LAZY | RTLD_LOCAL | RTLD_NOLOAD);