1 --- src/3rdparty/chromium/v8/src/flags/flags.cc.orig 2025-08-15 18:30:00 UTC 2 +++ src/3rdparty/chromium/v8/src/flags/flags.cc 3 @@ -16,6 +16,10 @@ 4 #include <set> 5 #include <sstream> 6 7 +#if V8_OS_OPENBSD 8 +#include <sys/mman.h> 9 +#endif 10 + 11 #include "src/base/hashing.h" 12 #include "src/base/lazy-instance.h" 13 #include "src/base/platform/platform.h" 14 @@ -823,6 +827,10 @@ void FlagList::FreezeFlags() { 15 // Note that for string flags we only protect the pointer itself, but not the 16 // string storage. TODO(12887): Fix this. 17 base::OS::SetDataReadOnly(&v8_flags, sizeof(v8_flags)); 18 +#if V8_OS_OPENBSD 19 + if (mimmutable(&v8_flags, sizeof(v8_flags)) == -1) 20 + FATAL("unable to set immutability of v8_flags"); 21 +#endif 22 } 23 24 // static 25