diff options
Diffstat (limited to 'src/common/mac/macho_id.cc')
-rw-r--r-- | src/common/mac/macho_id.cc | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/common/mac/macho_id.cc b/src/common/mac/macho_id.cc index e3f90e0c..c45329ed 100644 --- a/src/common/mac/macho_id.cc +++ b/src/common/mac/macho_id.cc @@ -47,6 +47,7 @@ #include "common/mac/macho_id.h" #include "common/mac/macho_walker.h" +#include "common/mac/macho_utilities.h" namespace MacFileUtilities { @@ -142,7 +143,7 @@ void MachoID::Update(MachoWalker *walker, unsigned long offset, size_t size) { } bool MachoID::UUIDCommand(int cpu_type, unsigned char bytes[16]) { - struct uuid_command uuid_cmd; + struct breakpad_uuid_command uuid_cmd; MachoWalker walker(path_, UUIDWalkerCB, &uuid_cmd); uuid_cmd.cmd = 0; @@ -284,7 +285,7 @@ bool MachoID::WalkerCB(MachoWalker *walker, load_command *cmd, off_t offset, return false; if (swap) - swap_segment_command_64(&seg64, NXHostByteOrder()); + breakpad_swap_segment_command_64(&seg64, NXHostByteOrder()); struct mach_header_64 header; off_t header_offset; @@ -301,7 +302,7 @@ bool MachoID::WalkerCB(MachoWalker *walker, load_command *cmd, off_t offset, return false; if (swap) - swap_section_64(&sec64, 1, NXHostByteOrder()); + breakpad_swap_section_64(&sec64, 1, NXHostByteOrder()); macho_id->Update(walker, header_offset + sec64.offset, sec64.size); offset += sizeof(struct section_64); @@ -316,13 +317,15 @@ bool MachoID::WalkerCB(MachoWalker *walker, load_command *cmd, off_t offset, bool MachoID::UUIDWalkerCB(MachoWalker *walker, load_command *cmd, off_t offset, bool swap, void *context) { if (cmd->cmd == LC_UUID) { - struct uuid_command *uuid_cmd = (struct uuid_command *)context; + struct breakpad_uuid_command *uuid_cmd = + (struct breakpad_uuid_command *)context; - if (!walker->ReadBytes(uuid_cmd, sizeof(struct uuid_command), offset)) + if (!walker->ReadBytes(uuid_cmd, sizeof(struct breakpad_uuid_command), + offset)) return false; if (swap) - swap_uuid_command(uuid_cmd, NXHostByteOrder()); + breakpad_swap_uuid_command(uuid_cmd, NXHostByteOrder()); return false; } |