From b961ef035a58d8c5fb12386ddad4c56648fbe153 Mon Sep 17 00:00:00 2001 From: "izsh.f0f" Date: Tue, 5 Jan 2010 12:32:44 +0000 Subject: [PATCH] client/elf.h: Add missing Elf32_Phdr struct to compile under Mac OS X. client/flash.h: Add missing header ifndef. --- client/elf.h | 11 +++++++++++ client/flash.h | 6 ++++++ 2 files changed, 17 insertions(+) diff --git a/client/elf.h b/client/elf.h index 349e6c6c..c489a137 100644 --- a/client/elf.h +++ b/client/elf.h @@ -1,6 +1,17 @@ #ifndef __ELF_H__ #define __ELF_H__ +typedef struct { + uint32_t p_type; + uint32_t p_offset; + uint32_t p_vaddr; + uint32_t p_paddr; + uint32_t p_filesz; + uint32_t p_memsz; + uint32_t p_flags; + uint32_t p_align; +} __attribute__((__packed__)) Elf32_Phdr; + #define EI_NIDENT 16 typedef struct { diff --git a/client/flash.h b/client/flash.h index 8d18cab0..c86602ff 100644 --- a/client/flash.h +++ b/client/flash.h @@ -1,3 +1,6 @@ +#ifndef __FLASH_H__ +#define __FLASH_H__ + struct partition { int start; int end; @@ -13,3 +16,6 @@ int find_next_area(const char *str, int *offset, int *length); #define PHYSICAL_FLASH_START 0x100000 void do_flash(char **argv); + +#endif + -- 2.39.5