libfdt: Fixups for 64-bit machines

The error encoding for pointers is incorrect on machines where
sizeof(int) != sizeof(void *), which includes most 64-bit platforms
(in particular, AMD64 and powerpc64).  This patch fixes it.
This commit is contained in:
David Gibson
2006-12-07 15:24:26 +11:00
parent e25487db34
commit 1a765f51a4

View File

@@ -41,7 +41,7 @@ const char *_fdt_find_string(const char *strtab, int tabsize, const char *s);
int _fdt_node_end_offset(struct fdt_header *fdt, int nodeoffset); int _fdt_node_end_offset(struct fdt_header *fdt, int nodeoffset);
#define OFFSET_ERROR(code) -(code) #define OFFSET_ERROR(code) -(code)
#define PTR_ERROR(code) (void *)(-(code)) #define PTR_ERROR(code) (void *)(-(long)(code))
#define SW_MAGIC (~FDT_MAGIC) #define SW_MAGIC (~FDT_MAGIC)