Skip to content

Instantly share code, notes, and snippets.

@antirez
Last active October 17, 2016 14:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save antirez/9de0b349315361dd15921fccf61e7c33 to your computer and use it in GitHub Desktop.
Save antirez/9de0b349315361dd15921fccf61e7c33 to your computer and use it in GitHub Desktop.
-#if defined(__ATOMIC_RELAXED) && (!defined(__clang__) || __apple_build_version__ > 4210057)
+#if defined(__ATOMIC_RELAXED) && (!defined(__clang__) || !defined(__APPLE__) || __apple_build_version__ > 4210057)
@antirez
Copy link
Author

antirez commented Oct 17, 2016

Yep since is not a feature macro, but is just a constant used in the API. I assumed that, if the constant is defined in the header files, then it is supported, which is not the case... I should find a better way to test if the atomic primitives are supported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment