tools/libxl: Check if fdt_{first,next}_subnode are present in libfdt
authorJulien Grall <julien.grall@linaro.org>
Tue, 17 Mar 2015 17:58:14 +0000 (17:58 +0000)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 21 May 2015 13:59:17 +0000 (14:59 +0100)
commit4b7fbef6fb309cc3058b5d7eb4c75996693f6401
tree544dddb3973f5374acc32fe703998e63ca9eecf9
parent640f891eb258563bb155e577389e8c5e6541a59a
tools/libxl: Check if fdt_{first,next}_subnode are present in libfdt

The functions fdt_{first,next}_subnode may not be available because:
    * It has been introduced in 2013 => Doesn't work on Wheezy
    * The prototype exists but the functions are not exposed. Don't ask
    why...

The later has been fixed recently in the dtc repo [1]

When the functions are not available, implement our own in order to use
them in a following patch.

Note that the _hidden attribute is placed in both the prototype and the
declaration because some version of libfdt expose the prototype but not
the declaration.

[1] git://git.kernel.org/pub/scm/utils/dtc/dtc.git
    commit a4b093f7366fdb429ca1781144d3985fa50d0fbb

Signed-off-by: Julien Grall <julien.grall@linaro.org>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
[ ijc -- ran autogen.sh ]
tools/config.h.in
tools/configure
tools/configure.ac
tools/libxl/Makefile
tools/libxl/libxl_libfdt_compat.c [new file with mode: 0644]
tools/libxl/libxl_libfdt_compat.h [new file with mode: 0644]