--- configure.orig 2019-03-20 16:57:56.000000000 +1100 +++ configure 2019-04-02 02:36:21.000000000 +1100 @@ -18020,10 +18020,27 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include + +#if !defined(__has_feature) +#define __has_feature(x) 0 +#endif + +#if !defined(__has_extension) +#define __has_extension(x) __has_feature(x) +#endif + +#if __has_extension(c_atomic) || __has_extension(cxx_atomic) +#define __CLANG_ATOMICS +#endif + int main () { +#ifdef __CLANG_ATOMICS +int32_t val = 0; __c11_atomic_fetch_add(&val, 1, __ATOMIC_RELAXED); +#else int32_t val = 0; __atomic_fetch_add(&val, 1, __ATOMIC_RELAXED); +#endif ; return 0; --- lib/isc/unix/include/isc/stdatomic.h.orig 2019-03-20 16:57:56.000000000 +1100 +++ lib/isc/unix/include/isc/stdatomic.h 2019-04-02 03:33:45.000000000 +1100 @@ -32,7 +32,7 @@ #endif #if !defined(__CLANG_ATOMICS) && !defined(__GNUC_ATOMICS) -#if __has_extension(c_atomic) || __has_extension(cxx_atomic) +#if defined(HAVE___ATOMIC) && (__has_extension(c_atomic) || __has_extension(cxx_atomic)) #define __CLANG_ATOMICS #elif __GNUC_PREREQ__(4, 7) #define __GNUC_ATOMICS