[PATCH] Fix libunwind to build on FreeBSD
Saleem Abdulrasool
compnerd at compnerd.org
Tue Apr 28 19:54:35 PDT 2015
LGTM with the minor change.
================
Comment at: src/AddressSpace.hpp:391
@@ -390,3 +390,3 @@
- for (ElfW(Half) i = 0; i < pinfo->dlpi_phnum; i++) {
- const ElfW(Phdr) *phdr = &pinfo->dlpi_phdr[i];
+#ifndef __FreeBSD__
+ typedef ElfW(Half) Elf_Half;
----------------
I think this would be better as:
#if !defined(Elf_Half)
typedef ElfW(Half) Elf_Half;
#endif
#if !defined(Elf_Phdr)
typedef ElfW(Phdr) Elf_Phdr;
#endif
http://reviews.llvm.org/D9272
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list