]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
added __has_attribute() define for non-clang compilers 1073/head
authorYann Collet <cyan@fb.com>
Sat, 24 Mar 2018 02:04:48 +0000 (19:04 -0700)
committerYann Collet <cyan@fb.com>
Sat, 24 Mar 2018 02:04:48 +0000 (19:04 -0700)
lib/common/compiler.h

index a6044c86147e89a9d29a4144aec3f6ad89d14628..e90a3bcde36cee2c809f2c704ffa529750a03ce9 100644 (file)
@@ -64,6 +64,9 @@
 #endif
 
 /* target attribute */
+#ifndef __has_attribute
+  #define __has_attribute(x) 0  /* Compatibility with non-clang compilers. */
+#endif
 #if defined(__GNUC__)
 #  define TARGET_ATTRIBUTE(target) __attribute__((__target__(target)))
 #else