From 553c7994ba61b6a4cb5f9588349bf318d8b4a923 Mon Sep 17 00:00:00 2001 From: Axel Ismirlian Date: Wed, 30 Jul 2014 09:23:21 -0500 Subject: [PATCH] Avoid potential conflict between AIX's and Lambda's var. In ../boost/lambda/detail/lambda_functor_base.hpp there is variable called var that conflicts with an AIX system variable. The entire file (sched.h) does not need to be included only the one function it uses (sched_yield). --- include/boost/smart_ptr/detail/yield_k.hpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/boost/smart_ptr/detail/yield_k.hpp b/include/boost/smart_ptr/detail/yield_k.hpp index 9f4496b..2dabc9f 100644 --- a/include/boost/smart_ptr/detail/yield_k.hpp +++ b/include/boost/smart_ptr/detail/yield_k.hpp @@ -98,7 +98,13 @@ inline void yield( unsigned k ) #elif defined( BOOST_HAS_PTHREADS ) +#ifndef _AIX #include +#else + // AIX's sched.h defines ::var which sometimes conflicts with Lambda's var + extern "C" int sched_yield(void); +#endif + #include namespace boost