From a558bfcedf9d87d12f158a6917383d228da7ca75 Mon Sep 17 00:00:00 2001 From: q66 Date: Mon, 4 Jan 2021 17:17:28 +0100 Subject: [PATCH] fix bubblewrap libdir mounts for 32-bit systems an upstream fix should be better than this, but this is good enough for void, since we strictly build with gcc anyway. and having a small patch is more important than portable patch --- .../UIProcess/Launcher/glib/BubblewrapLauncher.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp index 889388a..a7a75a8 100644 --- Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp +++ Source/WebKit/UIProcess/Launcher/glib/BubblewrapLauncher.cpp @@ -733,6 +733,12 @@ GRefPtr bubblewrapSpawn(GSubprocessLauncher* launcher, const Proces if (launchOptions.processType == ProcessLauncher::ProcessType::Network) return adoptGRef(g_subprocess_launcher_spawnv(launcher, argv, error)); +#if __UINTPTR_MAX__ > 0xFFFFFFFF +# define LIB_DIR_WS "64" +#else +# define LIB_DIR_WS "32" +#endif + Vector sandboxArgs = { "--die-with-parent", "--unshare-pid", @@ -765,9 +771,9 @@ GRefPtr bubblewrapSpawn(GSubprocessLauncher* launcher, const Proces "--ro-bind-try", "/usr/lib", "/usr/lib", "--ro-bind-try", "/usr/local/lib", "/usr/local/lib", "--ro-bind-try", LIBDIR, LIBDIR, - "--ro-bind-try", "/lib64", "/lib64", - "--ro-bind-try", "/usr/lib64", "/usr/lib64", - "--ro-bind-try", "/usr/local/lib64", "/usr/local/lib64", + "--ro-bind-try", "/lib" LIB_DIR_WS, "/lib" LIB_DIR_WS, + "--ro-bind-try", "/usr/lib" LIB_DIR_WS, "/usr/lib" LIB_DIR_WS, + "--ro-bind-try", "/usr/local/lib" LIB_DIR_WS, "/usr/local/lib" LIB_DIR_WS, "--ro-bind-try", PKGLIBEXECDIR, PKGLIBEXECDIR, }; -- 2.30.0