summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Chisnall <dchisnall@pathscale.com>2011-11-25 11:46:22 +0000
committerDavid Chisnall <dchisnall@pathscale.com>2011-11-25 11:46:22 +0000
commitf929524b3c4ac5e996725120966c818e15458f12 (patch)
tree64407b481a9e1edda7eaa3993c01fca8293c0cb9
parented2ad4589fe2dbf5bd560de64b68e8609ab1a42b (diff)
downloadlibcxxrt-f929524b3c4ac5e996725120966c818e15458f12.tar.gz
libcxxrt-f929524b3c4ac5e996725120966c818e15458f12.tar.bz2
libcxxrt-f929524b3c4ac5e996725120966c818e15458f12.tar.xz
Fix the build on compilers that don't have a __has_builtin
-rw-r--r--src/memory.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/memory.cc b/src/memory.cc
index 027bc3f..9a40b7f 100644
--- a/src/memory.cc
+++ b/src/memory.cc
@@ -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