Fix: only define membarrier system call on Linux
[urcu.git] / urcu / arch / aarch64.h
index a68813d14cd9074017bde2620a89edac9afa5a83..d6a133758dffca0c22ca5f6e94314c4c6d0d5390 100644 (file)
@@ -34,11 +34,11 @@ extern "C" {
 #include <sys/time.h>
 
 /*
- * Define the membarrier system call number if not yet available in the
- * system headers. aarch64 implements asm-generic/unistd.h system call
+ * On Linux, define the membarrier system call number if not yet available in
+ * the system headers. aarch64 implements asm-generic/unistd.h system call
  * numbers.
  */
-#ifndef __NR_membarrier
+#if (defined(__linux__) && !defined(__NR_membarrier))
 #define __NR_membarrier                283
 #endif
 
This page took 0.022474 seconds and 4 git commands to generate.