Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
empty portable.h and spread the include in files
[simgrid.git] / src / mc / mc_dwarf.cpp
index a8f58bb..dc7736a 100644 (file)
@@ -11,6 +11,7 @@
 #include <memory>
 #include <utility>
 
+#include <fcntl.h>
 #include <cstdlib>
 #define DW_LANG_Objc DW_LANG_ObjC       /* fix spelling error in older dwarf.h */
 #include <dwarf.h>
@@ -1065,7 +1066,9 @@ static char hexdigits[16] = {
 static inline
 std::array<char, 2> to_hex(std::uint8_t byte)
 {
-  return { hexdigits[byte >> 4], hexdigits[byte & 0xF] };
+  // Horrid double braces!
+  // Apparently, this is needed in C++11 (not in C++14).
+  return { { hexdigits[byte >> 4], hexdigits[byte & 0xF] } };
 }
 
 /** Binary data to hexadecimal */