diff options
author | Dave Cobbley <david.j.cobbley@linux.intel.com> | 2018-08-14 20:05:37 +0300 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-08-23 04:26:31 +0300 |
commit | eb8dc40360f0cfef56fb6947cc817a547d6d9bc6 (patch) | |
tree | de291a73dc37168da6370e2cf16c347d1eba9df8 /poky/meta/recipes-extended/acpica/files/manipulate-fds-instead-of-FILE.patch | |
parent | 9c3cf826d853102535ead04cebc2d6023eff3032 (diff) | |
download | openbmc-eb8dc40360f0cfef56fb6947cc817a547d6d9bc6.tar.xz |
[Subtree] Removing import-layers directory
As part of the move to subtrees, need to bring all the import layers
content to the top level.
Change-Id: I4a163d10898cbc6e11c27f776f60e1a470049d8f
Signed-off-by: Dave Cobbley <david.j.cobbley@linux.intel.com>
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'poky/meta/recipes-extended/acpica/files/manipulate-fds-instead-of-FILE.patch')
-rw-r--r-- | poky/meta/recipes-extended/acpica/files/manipulate-fds-instead-of-FILE.patch | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/poky/meta/recipes-extended/acpica/files/manipulate-fds-instead-of-FILE.patch b/poky/meta/recipes-extended/acpica/files/manipulate-fds-instead-of-FILE.patch new file mode 100644 index 000000000..5610ed9be --- /dev/null +++ b/poky/meta/recipes-extended/acpica/files/manipulate-fds-instead-of-FILE.patch @@ -0,0 +1,72 @@ +From 69171c22f3872ecb4c1ab27985e93ca44084595e Mon Sep 17 00:00:00 2001 +From: Fan Xin <fan.xin@jp.fujitsu.com> +Date: Mon, 5 Jun 2017 13:26:38 +0900 +Subject: [PATCH] aslfiles.c: manipulate fds instead of FILE + +Copying what stdout/stderr point to is not portable and fails with +musl because FILE is an undefined struct. + +Instead, use lower-level Unix functions to modify the file that stderr +writes into. This works on the platforms that Yocto targets. + +Upstream-Status: Inappropriate [embedded specific] + +Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> + +Rebase on acpica 20170303 + +Signed-off-by: Fan Xin <fan.xin@jp.fujitsu.com> +--- + acpica-unix2-20170303/source/compiler/aslfiles.c | 14 +++++++++++--- + 1 file changed, 11 insertions(+), 3 deletions(-) + +diff --git a/acpica-unix2-20170303/source/compiler/aslfiles.c b/acpica-unix2-20170303/source/compiler/aslfiles.c +index 809090c..97898b1 100644 +--- a/acpica-unix2-20170303/source/compiler/aslfiles.c ++++ b/acpica-unix2-20170303/source/compiler/aslfiles.c +@@ -44,6 +44,10 @@ + #include "aslcompiler.h" + #include "acapps.h" + #include "dtcompiler.h" ++#include <sys/types.h> ++#include <sys/stat.h> ++#include <fcntl.h> ++#include <unistd.h> + + #define _COMPONENT ACPI_COMPILER + ACPI_MODULE_NAME ("aslfiles") +@@ -607,6 +611,8 @@ FlOpenMiscOutputFiles ( + + if (Gbl_DebugFlag) + { ++ int fd; ++ + Filename = FlGenerateFilename (FilenamePrefix, FILE_SUFFIX_DEBUG); + if (!Filename) + { +@@ -618,10 +624,10 @@ FlOpenMiscOutputFiles ( + /* Open the debug file as STDERR, text mode */ + + Gbl_Files[ASL_FILE_DEBUG_OUTPUT].Filename = Filename; +- Gbl_Files[ASL_FILE_DEBUG_OUTPUT].Handle = +- freopen (Filename, "w+t", stderr); + +- if (!Gbl_Files[ASL_FILE_DEBUG_OUTPUT].Handle) ++ fd = open(Filename, O_CREAT|O_TRUNC, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH); ++ if (fd < 0 || ++ dup2(fd, fileno(stderr))) + { + /* + * A problem with freopen is that on error, we no longer +@@ -635,6 +641,8 @@ FlOpenMiscOutputFiles ( + exit (1); + } + ++ Gbl_Files[ASL_FILE_DEBUG_OUTPUT].Handle = stderr; ++ + AslCompilerSignon (ASL_FILE_DEBUG_OUTPUT); + AslCompilerFileHeader (ASL_FILE_DEBUG_OUTPUT); + } +-- +1.9.1 + |