diff --git a/projects/rocr-runtime/runtime/hsa-runtime/core/inc/amd_hsa_loader.hpp b/projects/rocr-runtime/runtime/hsa-runtime/core/inc/amd_hsa_loader.hpp
index 3460b83f24..3dff550fca 100644
--- a/projects/rocr-runtime/runtime/hsa-runtime/core/inc/amd_hsa_loader.hpp
+++ b/projects/rocr-runtime/runtime/hsa-runtime/core/inc/amd_hsa_loader.hpp
@@ -75,6 +75,50 @@
 /// @brief Descriptive version of the AMD HSA Loader.
 #define AMD_HSA_LOADER_VERSION "AMD HSA Loader v0.05 (June 16, 2015)"
 
+
+#ifndef ElfW
+  #if defined(__LP64__) || defined(_LP64)
+    #define ElfW(type) Elf64_##type
+  #else
+    #define ElfW(type) Elf32_##type
+  #endif
+#endif
+
+#ifndef PT_LOAD
+  #define PT_LOAD 1
+#endif
+
+#ifndef _GNU_SOURCE
+  #define _GNU_SOURCE
+#endif
+#ifndef _BSD_SOURCE
+  #define _BSD_SOURCE 1
+#endif
+
+#include <sys/types.h>
+#include <link.h>
+#include <elf.h>
+
+#ifndef ElfW
+  #if defined(__LP64__) || defined(_LP64)
+    #define ElfW(type) Elf64_##type
+  #else
+    #define ElfW(type) Elf32_##type
+  #endif
+#endif
+
+#ifndef Elf64_Addr
+  typedef uint64_t Elf64_Addr;
+#endif
+#ifndef Elf32_Addr
+  typedef uint32_t Elf32_Addr;
+#endif
+
+#ifndef PT_LOAD
+  #define PT_LOAD 1
+#endif
+
+
 enum hsa_ext_symbol_info_t {
   HSA_EXT_EXECUTABLE_SYMBOL_INFO_KERNEL_OBJECT_SIZE = 100,
   HSA_EXT_EXECUTABLE_SYMBOL_INFO_KERNEL_OBJECT_ALIGN = 101,
