Skip to contentSkip to conversation

libfdt: Fix C++ compile-time cast error on gnu 4.2.1

PATCH New Jerry Van Baren 1 participant 1 message Apr 1, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 4/4 libfdt: Fix C++ compile-time cast error on gnu 4.2.1

Allow the inclusion of libfdt.h in C++ source.

---
 include/libfdt.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
include/libfdt.h +1 -1
index ce374fd..d23d40e 100644
@@ -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);
Signature · 1 line
1.5.6.5