diff options
Diffstat (limited to 'recipes-bsp/u-boot/files/0002-libfdt-h-move-to-include-linux.patch')
-rw-r--r-- | recipes-bsp/u-boot/files/0002-libfdt-h-move-to-include-linux.patch | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/recipes-bsp/u-boot/files/0002-libfdt-h-move-to-include-linux.patch b/recipes-bsp/u-boot/files/0002-libfdt-h-move-to-include-linux.patch new file mode 100644 index 0000000..8f316a8 --- /dev/null +++ b/recipes-bsp/u-boot/files/0002-libfdt-h-move-to-include-linux.patch @@ -0,0 +1,65 @@ +From 89cc6282644fbb1deae2b5d18a29cb9daf7d1d97 Mon Sep 17 00:00:00 2001 +From: Max Krummenacher <max.krummenacher@toradex.com> +Date: Sat, 9 Jun 2018 12:29:37 +0200 +Subject: [PATCH 2/3] libfdt*h: move to include/linux + +--- + include/{ => linux}/libfdt.h | 7 ++++++- + include/{ => linux}/libfdt_env.h | 10 +++++++++- + 2 files changed, 15 insertions(+), 2 deletions(-) + rename include/{ => linux}/libfdt.h (99%) + rename include/{ => linux}/libfdt_env.h (78%) + +diff --git a/include/libfdt.h b/include/linux/libfdt.h +similarity index 99% +rename from include/libfdt.h +rename to include/linux/libfdt.h +index e2bc2e00c1..6eff62c820 100644 +--- a/include/libfdt.h ++++ b/include/linux/libfdt.h +@@ -51,7 +51,12 @@ + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +-#include <libfdt_env.h> ++#include <stdint.h> ++#include <linux/types.h> ++#include <asm/byteorder.h> ++#ifndef USE_HOSTCC ++#include <linux/libfdt_env.h> ++#endif + #include <fdt.h> + + #define FDT_FIRST_SUPPORTED_VERSION 0x10 +diff --git a/include/libfdt_env.h b/include/linux/libfdt_env.h +similarity index 78% +rename from include/libfdt_env.h +rename to include/linux/libfdt_env.h +index 6c6845f76c..4e80a56b23 100644 +--- a/include/libfdt_env.h ++++ b/include/linux/libfdt_env.h +@@ -5,7 +5,14 @@ + * + * SPDX-License-Identifier: LGPL-2.1+ + */ +- ++#ifdef USE_HOSTCC ++#include <libfdt_env.h> ++#else ++/* ++ * This position of the include guard is intentional. ++ * Using the same guard name as that of scripts/dtc/libfdt/libfdt_env.h ++ * prevents it from being included. ++ */ + #ifndef _LIBFDT_ENV_H + #define _LIBFDT_ENV_H + +@@ -33,3 +40,4 @@ typedef __be64 fdt64_t; + #define FDT_RAMDISK_OVERHEAD 0x80 + + #endif /* _LIBFDT_ENV_H */ ++#endif /* USE_HOSTCC */ +\ No newline at end of file +-- +2.13.7 + |