--- include/CL/cl.hpp.in	2013-02-28 15:32:09.000000000 +0200
+++ include/CL/cl.hpp	2013-02-28 15:32:41.000000000 +0200
@@ -212,8 +212,6 @@
 #if defined(linux) || defined(__APPLE__) || defined(__MACOSX)
 #include <alloca.h>
 
-#include <emmintrin.h>
-#include <xmmintrin.h>
 #endif // linux
 
 #include <cstring>
@@ -1035,7 +1033,7 @@
 #endif // !_WIN32
     }
 
-    inline void fence() { _mm_mfence(); }
+    inline void fence() { __sync_synchronize(); }
 }; // namespace detail
 
     

--- include/CL/cl.hpp.in	2013-02-28 15:32:09.000000000 +0200
+++ include/CL/cl.hpp	2013-02-28 15:32:41.000000000 +0200
@@ -212,8 +212,6 @@
 #if defined(linux) || defined(__APPLE__) || defined(__MACOSX)
 #include <alloca.h>
 
-#include <emmintrin.h>
-#include <xmmintrin.h>
 #endif // linux
 
 #include <cstring>
@@ -1035,7 +1033,7 @@
 #endif // !_WIN32
     }
 
-    inline void fence() { _mm_mfence(); }
+    inline void fence() { __sync_synchronize(); }
 }; // namespace detail
 
     
@@ -1128,7 +1129,9 @@
             return err;
         }
 
-        param->assign(&value[0], &value[required/sizeof(cl_device_id)]);
+        for (std::size_t i=0; i<required/sizeof(cl_device_id); ++i) {
+            memcpy(&(*param)[i], &value[i], sizeof(cl_device_id));
+        }
         return CL_SUCCESS;
     }
 };


Correct C++11 issue in Khronos header files
Correct C++11 issue in Khronos header files
