diff --git a/lang/c/src/avro/refcount.h b/lang/c/src/avro/refcount.h index 27369900ab9..fd431f3ccea 100644 --- a/lang/c/src/avro/refcount.h +++ b/lang/c/src/avro/refcount.h @@ -86,7 +86,10 @@ avro_refcount_dec(volatile int *refcount) * Mac OS X */ -#elif __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1050 +#elif __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1050 \ + && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101200 + +/* macOS 10.12 deprecates OSAtomic* so we'll use the GCC/Clang branch below */ #include