Fixed compilation warning with Clang < 14 - closes #546

This commit is contained in:
Andrew Kane
2024-05-07 20:53:41 -07:00
parent ad91451266
commit 69f49290fb
2 changed files with 5 additions and 1 deletions

View File

@@ -2,6 +2,7 @@
- Fixed `undefined symbol` error with GCC 8
- Fixed compilation error with universal binaries on Mac
- Fixed compilation warning with Clang < 14
## 0.7.0 (2024-04-29)

View File

@@ -19,9 +19,12 @@
#endif
/* target_clones requires glibc */
#if defined(USE_DISPATCH) && defined(__gnu_linux__)
#if defined(USE_DISPATCH) && defined(__gnu_linux__) && defined(__has_attribute)
/* Use separate line for portability */
#if __has_attribute(target_clones)
#define USE_TARGET_CLONES
#endif
#endif
/* Apple clang check needed for universal binaries on Mac */
#if defined(USE_DISPATCH) && (defined(HAVE__GET_CPUID) || defined(__apple_build_version__))