diff -r e33b4c18af59 Include/pyatomic.h
--- a/Include/pyatomic.h Wed Sep 16 12:18:55 2015 -0400
+++ b/Include/pyatomic.h Thu Sep 17 16:07:34 2015 +0200
@@ -1,6 +1,6 @@
/* Issue #23644: is incompatible with C++, see:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60932 */
-#if !defined(Py_LIMITED_API) && !defined(__cplusplus)
+#if !defined(Py_LIMITED_API) && defined(Py_BUILD_CORE)
#ifndef Py_ATOMIC_H
#define Py_ATOMIC_H