From: Laurent Gregoire Date: Tue, 3 Mar 2009 13:23:59 +0000 (+0100) Subject: libfdt: Fix C++ compile-time cast error on gnu 4.2.1 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=67b89c79e72fe86b0ea0199425d880630beb95d8;p=project%2Fbcm63xx%2Fu-boot.git libfdt: Fix C++ compile-time cast error on gnu 4.2.1 Allow the inclusion of libfdt.h in C++ source. Signed-off-by: Laurent Gregoire Acked-by: David Gibson --- diff --git a/include/libfdt.h b/include/libfdt.h index ce374fded1..d23d40e07b 100644 --- a/include/libfdt.h +++ b/include/libfdt.h @@ -156,7 +156,7 @@ int fdt_next_node(const void *fdt, int offset, int *depth); #define __fdt_set_hdr(name) \ static inline void fdt_set_##name(void *fdt, uint32_t val) \ { \ - struct fdt_header *fdth = fdt; \ + struct fdt_header *fdth = (struct fdt_header*)fdt; \ fdth->name = cpu_to_fdt32(val); \ } __fdt_set_hdr(magic);