Thread (1 message) 1 message, 1 author, 2009-03-04

Re: [PATCH] libfdt: Fix C++ compile-time cast error on gnu 4.2.1

From: David Gibson <hidden>
Date: 2009-03-04 01:05:35

Possibly related (same subject, not in this thread)

On Tue, Mar 03, 2009 at 02:23:59PM +0100, Laurent Gregoire wrote:
Allow the inclusion of libfdt.h in C++ source.
---
Signed-off-by: Laurent Gregoire <redacted>
Acked-by: David Gibson <redacted>
quoted hunk
---
diff -uprN a/libfdt/libfdt.h b/libfdt/libfdt.h
--- a/libfdt/libfdt.h 2008-07-25 23:17:04.000000000 +0200
+++ b/libfdt/libfdt.h 2009-03-03 14:01:38.000000000 +0100
@@ -156,7 +156,7 @@ int fdt_next_node(const void *fdt, int o
 #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);
-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help