package/uboot-omap: backport patches to fix build

* 106: fix build when libfdt-devel is installed on host
* 107: fix stdbool.h includes

Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
This commit is contained in:
Alexander Couzens 2019-03-16 23:19:04 +01:00
parent 28920330f8
commit 95f07502b7
No known key found for this signature in database
GPG Key ID: C29E9DA6A0DF8604
3 changed files with 3168 additions and 1 deletions

View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_VERSION:=2017.01
PKG_RELEASE:=3
PKG_RELEASE:=4
PKG_HASH:=6c425175f93a4bcf2ec9faf5658ef279633dbd7856a293d95bd1ff516528ecf2

View File

@ -0,0 +1,75 @@
From ad23f45b346f196e07ba49d354a12762f19abfa4 Mon Sep 17 00:00:00 2001
From: Masahiro Yamada <yamada.masahiro@socionext.com>
Date: Sun, 21 Jan 2018 19:19:15 +0900
Subject: [PATCH 2/2] tools: include necessary headers explicitly
Several host-tools use "bool" type without including <stdbool.h>.
This relies on the crappy header inclusion chain.
tools/Makefile has the following line:
HOST_EXTRACFLAGS += -include $(srctree)/include/libfdt_env.h \
All host-tools are forced to include libfdt_env.h even if they are
totally unrelated to FDT. Then, <stdbool.h> is indirectly included
as follows:
include/libfdt_env.h
-> include/linux/types.h
-> <stdbool.h>
I am fixing this horrible crap. In advance, I need to add necessary
include directives explicitly. tools/fdtgrep.c needs more; <fctl.h>
for open() and <errno.h> for errno.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
---
tools/fdtgrep.c | 3 +++
tools/ifdtool.c | 1 +
tools/imagetool.h | 1 +
3 files changed, 5 insertions(+)
diff --git a/tools/fdtgrep.c b/tools/fdtgrep.c
index fbe38c824a41..13703fc3b1b9 100644
--- a/tools/fdtgrep.c
+++ b/tools/fdtgrep.c
@@ -10,7 +10,10 @@
#include <assert.h>
#include <ctype.h>
+#include <errno.h>
#include <getopt.h>
+#include <fcntl.h>
+#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/tools/ifdtool.c b/tools/ifdtool.c
index c805597744bd..e4c2f82c4a1e 100644
--- a/tools/ifdtool.c
+++ b/tools/ifdtool.c
@@ -12,6 +12,7 @@
#include <assert.h>
#include <fcntl.h>
#include <getopt.h>
+#include <stdbool.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
diff --git a/tools/imagetool.h b/tools/imagetool.h
index 15c2a0c0e1c1..076e5e0dc8f9 100644
--- a/tools/imagetool.h
+++ b/tools/imagetool.h
@@ -12,6 +12,7 @@
#include "os_support.h"
#include <errno.h>
#include <fcntl.h>
+#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
--
2.21.0