]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
utils: Support __has_feature() macro on non-LLVM compilers by returning 0
authorMartin Willi <martin@revosec.ch>
Wed, 15 Apr 2015 12:20:52 +0000 (14:20 +0200)
committerTobias Brunner <tobias@strongswan.org>
Thu, 15 Sep 2022 10:16:12 +0000 (12:16 +0200)
src/libstrongswan/utils/utils.h

index c7ccd3afaca52a147d9f920da49ef5d169ed06a8..120b159508c086cd0e249f031892013398fbf4fa 100644 (file)
@@ -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
  */