| Index: src/common/mac/macho_walker.cc
|
| diff --git a/src/common/mac/macho_walker.cc b/src/common/mac/macho_walker.cc
|
| index eee27d64f52869cf7cf79a56dcab043ea4fc316e..463138e9f397c7f693598ca3f87070b6a7a9b943 100644
|
| --- a/src/common/mac/macho_walker.cc
|
| +++ b/src/common/mac/macho_walker.cc
|
| @@ -37,8 +37,8 @@ extern "C" { // necessary for Leopard
|
| #include <assert.h>
|
| #include <fcntl.h>
|
| #include <mach-o/arch.h>
|
| + #include <mach-o/fat.h>
|
| #include <mach-o/loader.h>
|
| - #include <mach-o/swap.h>
|
| #include <string.h>
|
| #include <unistd.h>
|
| }
|
| @@ -156,7 +156,7 @@ bool MachoWalker::FindHeader(cpu_type_t cpu_type,
|
| return false;
|
|
|
| if (magic == MH_CIGAM || magic == MH_CIGAM_64)
|
| - swap_mach_header(&header, NXHostByteOrder());
|
| + breakpad_swap_mach_header(&header);
|
|
|
| if (cpu_type != header.cputype ||
|
| (cpu_subtype != CPU_SUBTYPE_MULTIPLE &&
|
| @@ -174,7 +174,7 @@ bool MachoWalker::FindHeader(cpu_type_t cpu_type,
|
| return false;
|
|
|
| if (NXHostByteOrder() != NX_BigEndian)
|
| - swap_fat_header(&fat, NXHostByteOrder());
|
| + breakpad_swap_fat_header(&fat);
|
|
|
| offset += sizeof(fat);
|
|
|
| @@ -185,7 +185,7 @@ bool MachoWalker::FindHeader(cpu_type_t cpu_type,
|
| return false;
|
|
|
| if (NXHostByteOrder() != NX_BigEndian)
|
| - swap_fat_arch(&arch, 1, NXHostByteOrder());
|
| + breakpad_swap_fat_arch(&arch, 1);
|
|
|
| if (arch.cputype == cpu_type &&
|
| (cpu_subtype == CPU_SUBTYPE_MULTIPLE ||
|
| @@ -208,7 +208,7 @@ bool MachoWalker::WalkHeaderAtOffset(off_t offset) {
|
|
|
| bool swap = (header.magic == MH_CIGAM);
|
| if (swap)
|
| - swap_mach_header(&header, NXHostByteOrder());
|
| + breakpad_swap_mach_header(&header);
|
|
|
| // Copy the data into the mach_header_64 structure. Since the 32-bit and
|
| // 64-bit only differ in the last field (reserved), this is safe to do.
|
| @@ -234,7 +234,7 @@ bool MachoWalker::WalkHeader64AtOffset(off_t offset) {
|
|
|
| bool swap = (header.magic == MH_CIGAM_64);
|
| if (swap)
|
| - breakpad_swap_mach_header_64(&header, NXHostByteOrder());
|
| + breakpad_swap_mach_header_64(&header);
|
|
|
| current_header_ = &header;
|
| current_header_size_ = sizeof(header);
|
| @@ -255,7 +255,7 @@ bool MachoWalker::WalkHeaderCore(off_t offset, uint32_t number_of_commands,
|
| return false;
|
|
|
| if (swap)
|
| - swap_load_command(&cmd, NXHostByteOrder());
|
| + breakpad_swap_load_command(&cmd);
|
|
|
| // Call the user callback
|
| if (callback_ && !callback_(this, &cmd, offset, swap, callback_context_))
|
|
|