From 3851f0ea3eea79622f1fa18888f70897d7edc4cd Mon Sep 17 00:00:00 2001 From: Sathya Gunasekar Date: Mon, 14 Oct 2013 19:50:20 -0700 Subject: [PATCH] Include cpp only when needed Summary: D1008921 broke compilation for tao which uses folly/Portability.h This diff guards the change for only c++ code. Not sure if this breaks the definition of portability. Test Plan: Compile tao, fbconfig -r folly and fbmake runtests Reviewed By: simpkins@fb.com FB internal diff: D1010967 @override-unit-failures --- folly/Portability.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/folly/Portability.h b/folly/Portability.h index 47d33be4..6d5ab9c9 100644 --- a/folly/Portability.h +++ b/folly/Portability.h @@ -137,6 +137,7 @@ struct MaxAlign { char c; } __attribute__((aligned)); #include "folly/detail/Clock.h" #endif +#if defined(__cplusplus) // Unfortunately, boost::has_trivial_copy is broken in libc++ due to its // usage of __has_trivial_copy(), so we can't use it as a // least-common-denominator for C++11 implementations that don't support @@ -153,5 +154,6 @@ struct MaxAlign { char c; } __attribute__((aligned)); #include #define FOLLY_IS_TRIVIALLY_COPYABLE(T) (boost::has_trivial_copy::value) #endif +#endif // __cplusplus #endif // FOLLY_PORTABILITY_H_ -- 2.34.1