From: Yann Collet Date: Sat, 24 Mar 2018 02:04:48 +0000 (-0700) Subject: added __has_attribute() define for non-clang compilers X-Git-Tag: v1.3.4~1^2~5^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1073%2Fhead;p=thirdparty%2Fzstd.git added __has_attribute() define for non-clang compilers --- diff --git a/lib/common/compiler.h b/lib/common/compiler.h index a6044c861..e90a3bcde 100644 --- a/lib/common/compiler.h +++ b/lib/common/compiler.h @@ -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