From 99b84b6cb51066cbfc8826167940ef79ab4b3adf Mon Sep 17 00:00:00 2001 From: q66 Date: Fri, 4 Sep 2020 02:06:42 +0200 Subject: [PATCH] chromium: fix sandbox large file flag constant for ppc64 --- srcpkgs/chromium/patches/xxx-ppc64le-support.patch | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/srcpkgs/chromium/patches/xxx-ppc64le-support.patch b/srcpkgs/chromium/patches/xxx-ppc64le-support.patch index 01a695ad658..53dabe0cb2f 100644 --- a/srcpkgs/chromium/patches/xxx-ppc64le-support.patch +++ b/srcpkgs/chromium/patches/xxx-ppc64le-support.patch @@ -249,19 +249,15 @@ index f51915edc..ca2f4f106 100644 // Ubuntu's version of glibc has a race condition in sem_post that can cause // it to call futex(2) with bogus op arguments. To workaround this, we need // to allow those futex(2) calls to fail with EINVAL, instead of crashing the -@@ -246,9 +261,11 @@ ResultExpr RestrictFcntlCommands() { - // operator. - // Glibc overrides the kernel's O_LARGEFILE value. Account for this. +@@ -248,6 +263,8 @@ ResultExpr RestrictFcntlCommands() { uint64_t kOLargeFileFlag = O_LARGEFILE; -- if (IsArchitectureX86_64() || IsArchitectureI386() || IsArchitectureMips()) -+ if (IsArchitectureX86_64() || IsArchitectureI386() || IsArchitectureMips() \ -+ || IsArchitecturePPC64()) + if (IsArchitectureX86_64() || IsArchitectureI386() || IsArchitectureMips()) kOLargeFileFlag = 0100000; ++ else if (IsArchitecturePPC64()) ++ kOLargeFileFlag = 0200000; -+ const Arg cmd(1); const Arg long_arg(2); - @@ -262,14 +279,23 @@ ResultExpr RestrictFcntlCommands() { F_SETLKW, F_GETLK,