Permalink
Browse files

Fix the build on compilers that don't have a __has_builtin

  • Loading branch information...
1 parent ed2ad45 commit f929524b3c4ac5e996725120966c818e15458f12 David Chisnall committed Nov 25, 2011
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/memory.cc
View
@@ -11,6 +11,10 @@
#include <stdlib.h>
#include "stdexcept.h"
+#ifndef __has_builtin
+#define __has_builtin(x) 0
+#endif
+
#if !__has_builtin(__sync_swap)
#define __sync_swap __sync_lock_test_and_set
#endif

0 comments on commit f929524

Please sign in to comment.