From: Mathieu Desnoyers Date: Wed, 29 Jun 2011 16:46:52 +0000 (-0400) Subject: Check for __linux__ before including syscall.h X-Git-Tag: v0.6.4~19 X-Git-Url: http://git.liburcu.org/?p=urcu.git;a=commitdiff_plain;h=4906d39806200a81e2f66ef5380974890c4e00c6 Check for __linux__ before including syscall.h Reported-by: Jean-François Brousseau Signed-off-by: Mathieu Desnoyers --- diff --git a/urcu/static/urcu.h b/urcu/static/urcu.h index 777fa4c..5ba3004 100644 --- a/urcu/static/urcu.h +++ b/urcu/static/urcu.h @@ -31,7 +31,6 @@ #include #include -#include #include #include @@ -46,14 +45,17 @@ extern "C" { #endif -/* Default is RCU_MEMBARRIER */ +/* Default is RCU_MEMBARRIER on linux */ #if !defined(RCU_MEMBARRIER) && !defined(RCU_MB) && !defined(RCU_SIGNAL) -#define RCU_MEMBARRIER +# ifdef __linux__ +# define RCU_MEMBARRIER +# else +# define RCU_MB +# endif #endif #ifdef RCU_MEMBARRIER -#include -#include +#include /* If the headers do not support SYS_membarrier, statically use RCU_MB */ #ifdef SYS_membarrier