diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-06-17 10:47:58 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-06-17 16:31:48 +0100 |
commit | 9a4547804f0a889dc583e84a00374085ecf7f361 (patch) | |
tree | a1d54ce36981ffae1ad524ca237bc813ed2e11d1 /meta/recipes-devtools/patchelf/patchelf/handle-read-only-files.patch | |
parent | 72c4222b095a49d5ba8252abbae5025196519cd5 (diff) | |
download | openembedded-core-9a4547804f0a889dc583e84a00374085ecf7f361.tar.gz |
patchelf: Upgrade 0.10 -> 0.11
Two patches were merged upstream, the other needed refreshing.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/patchelf/patchelf/handle-read-only-files.patch')
-rw-r--r-- | meta/recipes-devtools/patchelf/patchelf/handle-read-only-files.patch | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/meta/recipes-devtools/patchelf/patchelf/handle-read-only-files.patch b/meta/recipes-devtools/patchelf/patchelf/handle-read-only-files.patch index 03b0d18a89..bf721c1af8 100644 --- a/meta/recipes-devtools/patchelf/patchelf/handle-read-only-files.patch +++ b/meta/recipes-devtools/patchelf/patchelf/handle-read-only-files.patch @@ -14,30 +14,32 @@ Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br> src/patchelf.cc | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) -diff --git a/src/patchelf.cc b/src/patchelf.cc -index 0b4965adff83..b5db2aef0e8a 100644 ---- a/src/patchelf.cc -+++ b/src/patchelf.cc -@@ -497,7 +497,17 @@ void ElfFile<ElfFileParamNames>::sortShdrs() +Index: git/src/patchelf.cc +=================================================================== +--- git.orig/src/patchelf.cc ++++ git/src/patchelf.cc +@@ -499,9 +499,19 @@ void ElfFile<ElfFileParamNames>::sortShd static void writeFile(std::string fileName, FileContents contents) { -- int fd = open(fileName.c_str(), O_TRUNC | O_WRONLY); + struct stat st; + int fd; + + debug("writing %s\n", fileName.c_str()); + +- int fd = open(fileName.c_str(), O_CREAT | O_TRUNC | O_WRONLY, 0777); + if (stat(fileName.c_str(), &st) != 0) + error("stat"); + + if (chmod(fileName.c_str(), 0600) != 0) + error("chmod"); + -+ fd = open(fileName.c_str(), O_TRUNC | O_WRONLY); ++ fd = open(fileName.c_str(), O_CREAT | O_TRUNC | O_WRONLY, 0777); + if (fd == -1) error("open"); -@@ -511,6 +521,10 @@ static void writeFile(std::string fileName, FileContents contents) +@@ -515,6 +525,10 @@ static void writeFile(std::string fileNa if (close(fd) != 0) error("close"); |