Add support for Linux
[elfdbg/.git] / compat.h
CommitLineData
418b72b3
SB
1#ifndef ELFDBG_COMPAT_H
2#define ELFDBG_COMPAT_H 1
3
4/* Linux does not define the generic typedef arch independant */
5#ifdef __linux__
6#ifdef __x86_64__
7typedef Elf64_Ehdr Elf_Ehdr;
8typedef Elf64_Shdr Elf_Shdr;
9#else
10typedef Elf32_Ehdr Elf_Ehdr;
11typedef Elf32_Shdr Elf_Shdr;
12#endif
13
14/* Linux does not define strnstr() function */
15char *strnstr(const char *, const char *, size_t);
16#endif
17
18#endif /* ELFDBG_COMPAT_H */