Index: uspace/lib/cpp/src/__bits/glue.cpp
===================================================================
--- uspace/lib/cpp/src/__bits/glue.cpp	(revision a37eeb9ba97e3e9ba5e9566f217542e2b135459b)
+++ uspace/lib/cpp/src/__bits/glue.cpp	(revision 7340164378ec3af3f5a6393beaa2f6268162f93d)
@@ -38,4 +38,5 @@
  * the compiler, so we need to define stubs for our library
  * to compile on this architecture.
+ * TODO: make this synchronized
  */
 extern "C"
@@ -53,5 +54,5 @@
 
 #define LIBCPP_GLUE_CMP_AND_SWAP(TYPE, SIZE) \
-    TYPE __sync_compare_and_swap_##SIZE (TYPE* ptr, TYPE old_val, TYPE new_val) \
+    TYPE __sync_val_compare_and_swap_##SIZE (TYPE* ptr, TYPE old_val, TYPE new_val) \
     { \
         if (*ptr == old_val) \
