Skip to contentSkip to conversation

libfdt: libfdt_env.h must be included first

PATCH Applied David Gibson 2 participants 2 messages Oct 16, 2007

lore
Share & tools
lore
#0 lore raw

libfdt.h currently includes fdt.h, then libfdt_env.h. This is incorrect, because depending on the environment into which libfdt is embedded, libfdt_env.h may be needed to define datatypes used in fdt.h. This patch corrects the problem.

---

I've sent this one before, but I guess it got lost in the backlog.

libfdt/libfdt.h +1 -1
Index: dtc/libfdt/libfdt.h
===================================================================
@@ -51,8 +51,8 @@
  *     EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <fdt.h>
 #include <libfdt_env.h>
+#include <fdt.h>
 
 #define FDT_FIRST_SUPPORTED_VERSION	0x10
 #define FDT_LAST_SUPPORTED_VERSION	0x11
Signature · 4 lines
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
Applied
#1 lore raw

So, like, the other day David Gibson mumbled:

Quoted 9 lines

libfdt.h currently includes fdt.h, then libfdt_env.h. This is incorrect, because depending on the environment into which libfdt is embedded, libfdt_env.h may be needed to define datatypes used in fdt.h. This patch corrects the problem.

---

I've sent this one before, but I guess it got lost in the backlog.

Sorry. There was some froohah around it and I didn't track where it landed.

Applied.

jdl