From 1866d335387eb4657bb323e3b4b2c74f92d65be8 Mon Sep 17 00:00:00 2001 From: Martin Willi Date: Wed, 15 Apr 2015 14:20:52 +0200 Subject: [PATCH] utils: Support __has_feature() macro on non-LLVM compilers by returning 0 --- src/libstrongswan/utils/utils.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/libstrongswan/utils/utils.h b/src/libstrongswan/utils/utils.h index c7ccd3afa..120b15950 100644 --- a/src/libstrongswan/utils/utils.h +++ b/src/libstrongswan/utils/utils.h @@ -112,6 +112,13 @@ void utils_deinit(); #define BUILD_ASSERT_ARRAY(a) \ BUILD_ASSERT(!__builtin_types_compatible_p(typeof(a), typeof(&(a)[0]))) +/** + * LLVM/Clang __has_feature support + */ +#ifndef __has_feature +# define __has_feature(x) 0 +#endif + /** * Debug macro to follow control flow */