File libev.patch of Package python-gevent

Index: gevent-1.0/libev/ev.c
===================================================================
--- gevent-1.0.orig/libev/ev.c
+++ gevent-1.0/libev/ev.c
@@ -617,9 +617,16 @@ struct signalfd_siginfo
   #if ECB_GCC_VERSION(4,7)
     /* see comment below (stdatomic.h) about the C11 memory model. */
     #define ECB_MEMORY_FENCE         __atomic_thread_fence (__ATOMIC_SEQ_CST)
-  #elif defined __clang && __has_feature (cxx_atomic)
-    /* see comment below (stdatomic.h) about the C11 memory model. */
-    #define ECB_MEMORY_FENCE         __c11_atomic_thread_fence (__ATOMIC_SEQ_CST)
+
+  /* The __has_feature syntax from clang is so misdesigned that we cannot use it
+   * without risking compile time errors with other compilers. We *could*
+   * define our own ecb_clang_has_feature, but I just can't be bothered to work
+   * around this shit time and again.
+   * #elif defined __clang && __has_feature (cxx_atomic)
+   *   // see comment below (stdatomic.h) about the C11 memory model.
+   *   #define ECB_MEMORY_FENCE         __c11_atomic_thread_fence (__ATOMIC_SEQ_CST)
+   */
+
   #elif ECB_GCC_VERSION(4,4) || defined __INTEL_COMPILER || defined __clang__
     #define ECB_MEMORY_FENCE         __sync_synchronize ()
   #elif _MSC_VER >= 1400 /* VC++ 2005 */
openSUSE Build Service is sponsored by