From: Mathieu Desnoyers Date: Wed, 17 Aug 2022 20:41:47 +0000 (-0400) Subject: Fix: futex.h: include headers outside extern C X-Git-Tag: v0.12.4~2 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=2de13c1686ecccffff957cf823f068180a33bd0d;p=userspace-rcu.git Fix: futex.h: include headers outside extern C Signed-off-by: Mathieu Desnoyers Change-Id: Ia8aac42e74d1d401cd893a30afb9cbde29a993d5 --- diff --git a/include/urcu/futex.h b/include/urcu/futex.h index e89d319..576d612 100644 --- a/include/urcu/futex.h +++ b/include/urcu/futex.h @@ -28,6 +28,20 @@ #include #include +#ifdef CONFIG_RCU_HAVE_FUTEX + +#include +#include +#include +#include + +#elif defined(__FreeBSD__) + +#include +#include + +#endif + #ifdef __cplusplus extern "C" { #endif @@ -56,11 +70,6 @@ extern int compat_futex_async(int32_t *uaddr, int op, int32_t val, #ifdef CONFIG_RCU_HAVE_FUTEX -#include -#include -#include -#include - static inline int futex(int32_t *uaddr, int op, int32_t val, const struct timespec *timeout, int32_t *uaddr2, int32_t val3) { @@ -106,9 +115,6 @@ static inline int futex_async(int32_t *uaddr, int op, int32_t val, #elif defined(__FreeBSD__) -#include -#include - static inline int futex_async(int32_t *uaddr, int op, int32_t val, const struct timespec *timeout, int32_t *uaddr2 __attribute__((unused)),