From b46420506f7fa462b1a267e5bb5ed1bb7e6535a1 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sun, 23 Oct 2016 17:43:16 +0200 Subject: [PATCH] update_ext: fix build with glibc > 2.21 (open needs mode) --- src/gui/update_ext.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/update_ext.cpp b/src/gui/update_ext.cpp index c946c89b5..3e6246d36 100644 --- a/src/gui/update_ext.cpp +++ b/src/gui/update_ext.cpp @@ -324,7 +324,7 @@ bool CExtUpdate::applySettings() fd2 = -1; int tmpCount = 0; while (fd2 < 0) { - fd2 = open(mtdBlockFileName.c_str(), O_WRONLY); + fd2 = open(mtdBlockFileName.c_str(), O_WRONLY, 00644); tmpCount++; if (tmpCount > 3) break; @@ -375,7 +375,7 @@ bool CExtUpdate::applySettings() if (fd1 < 0) return ErrorReset(RESET_UNLOAD | DELETE_MTDBUF, "cannot read mtdBlock"); fsize = mtdRamSize; - fd2 = open(imgFilename.c_str(), O_WRONLY | O_CREAT); + fd2 = open(imgFilename.c_str(), O_WRONLY | O_CREAT, 00644); if (fd2 < 0) return ErrorReset(RESET_UNLOAD | CLOSE_FD1 | DELETE_MTDBUF, "cannot open image file: ", imgFilename); while(fsize > 0) {