summaryrefslogtreecommitdiffstats
path: root/Source/cmELF.cxx
diff options
context:
space:
mode:
authorAdrien Destugues <pulkomandy@pulkomandy.tk>2014-03-03 14:47:08 (GMT)
committerBrad King <brad.king@kitware.com>2014-03-21 12:19:09 (GMT)
commit84603d804c285c75f4bf81f9d79f0ebd0ca68fea (patch)
tree68486b6107422a335bc6d2f5b8233762da5c1aae /Source/cmELF.cxx
parent0f79dab48bf17e867fe19a7b7140fa7513f4b72d (diff)
downloadCMake-84603d804c285c75f4bf81f9d79f0ebd0ca68fea.zip
CMake-84603d804c285c75f4bf81f9d79f0ebd0ca68fea.tar.gz
CMake-84603d804c285c75f4bf81f9d79f0ebd0ca68fea.tar.bz2
Haiku: Enable CMake builtin ELF editor
Co-Author: Brad King <brad.king@kitware.com>
Diffstat (limited to 'Source/cmELF.cxx')
-rw-r--r--Source/cmELF.cxx20
1 files changed, 20 insertions, 0 deletions
diff --git a/Source/cmELF.cxx b/Source/cmELF.cxx
index bc1c25b..dc6772c 100644
--- a/Source/cmELF.cxx
+++ b/Source/cmELF.cxx
@@ -23,6 +23,26 @@
#if defined(__OpenBSD__)
# include <stdint.h>
# include <elf_abi.h>
+#elif defined(__HAIKU__)
+# include <elf32.h>
+# include <elf64.h>
+ typedef struct Elf32_Ehdr Elf32_Ehdr;
+ typedef struct Elf32_Shdr Elf32_Shdr;
+ typedef struct Elf32_Sym Elf32_Sym;
+ typedef struct Elf32_Rel Elf32_Rel;
+ typedef struct Elf32_Rela Elf32_Rela;
+# define ELFMAG0 0x7F
+# define ELFMAG1 'E'
+# define ELFMAG2 'L'
+# define ELFMAG3 'F'
+# define ET_NONE 0
+# define ET_REL 1
+# define ET_EXEC 2
+# define ET_DYN 3
+# define ET_CORE 4
+# define EM_386 3
+# define EM_SPARC 2
+# define EM_PPC 20
#else
# include <elf.h>
#endif