From: Christopher Dykes Date: Tue, 26 Jul 2016 22:52:13 +0000 (-0700) Subject: Only try to use the membarrier on Linux X-Git-Tag: v2016.07.29.00~13 X-Git-Url: http://plrg.eecs.uci.edu/git/?p=folly.git;a=commitdiff_plain;h=c6476cb3c688c1a76f401ace9b4441a6f7c95450 Only try to use the membarrier on Linux Summary: It doesn't exist anywhere else, and `syscall` isn't even defined on Windows, so this completely failed to compile before. Reviewed By: yfeldblum Differential Revision: D3623382 fbshipit-source-id: 302093ddc96d6465e0dcc1883747229a7fb25a84 --- diff --git a/folly/portability/SysMembarrier.cpp b/folly/portability/SysMembarrier.cpp index 16fa5fb0..7801000f 100644 --- a/folly/portability/SysMembarrier.cpp +++ b/folly/portability/SysMembarrier.cpp @@ -21,7 +21,8 @@ #include #include -#if !defined(__NR_membarrier) && FOLLY_X64 && !FOLLY_MOBILE +#if !defined(__NR_membarrier) && FOLLY_X64 && !FOLLY_MOBILE && \ + defined(__linux__) #define __NR_membarrier 324 #define MEMBARRIER_CMD_QUERY 0 #define MEMBARRIER_CMD_SHARED 1