$NetBSD: patch-v8_src_flags_flags.cc,v 1.7 2025/09/12 16:02:39 kikadf Exp $ * Part of patchset to build chromium on NetBSD * Based on OpenBSD's chromium patches, and pkgsrc's qt5-qtwebengine patches --- v8/src/flags/flags.cc.orig 2025-09-08 23:21:33.000000000 +0000 +++ v8/src/flags/flags.cc @@ -16,6 +16,10 @@ #include #include +#if V8_OS_OPENBSD +#include +#endif + #include "src/base/fpu.h" #include "src/base/hashing.h" #include "src/base/lazy-instance.h" @@ -827,6 +831,10 @@ void FlagList::FreezeFlags() { // Note that for string flags we only protect the pointer itself, but not the // string storage. TODO(12887): Fix this. base::OS::SetDataReadOnly(&v8_flags, sizeof(v8_flags)); +#if V8_OS_OPENBSD + if (mimmutable(&v8_flags, sizeof(v8_flags)) == -1) + FATAL("unable to set immutability of v8_flags"); +#endif } // static