[PowerPC] Add missing build dependency
[oota-llvm.git] / lib / ExecutionEngine / RTDyldMemoryManager.cpp
index 0372bb6ce587a06e046ff7af61c4e0c39198c002..4e7645722a4c1f484e0bf8eec7d9813da8ae489c 100644 (file)
@@ -16,6 +16,8 @@
 #include "llvm/Support/DynamicLibrary.h"
 #include "llvm/Support/ErrorHandling.h"
 
+#include <cstdlib>
+
 #ifdef __linux__
   // These includes used by RTDyldMemoryManager::getPointerToNamedFunction()
   // for Glibc trickery. See comments in this function for more information.
@@ -43,11 +45,11 @@ extern "C" void __register_frame(void*);
 
 static const char *processFDE(const char *Entry) {
   const char *P = Entry;
-  uint32_t Length = *((uint32_t*)P);
+  uint32_t Length = *((const uint32_t *)P);
   P += 4;
-  uint32_t Offset = *((uint32_t*)P);
+  uint32_t Offset = *((const uint32_t *)P);
   if (Offset != 0)
-    __register_frame((void*)Entry);
+    __register_frame(const_cast<char *>(Entry));
   return P + Length;
 }
 #endif