-BEGIN VERIFY SCRIPT-
sed -i 's/const bool debug_only,/unsigned int flags, &/' src/util/system.h src/util/system.cpp
sed -i -E 's/(true|false), OptionsCategory::/ArgsManager::ALLOW_ANY, &/' $(git grep --files-with-matches 'AddArg(' src)
-END VERIFY SCRIPT-
This is a partial backport of Core PR16097 : https://github.com/bitcoin/bitcoin/pull/16097/commits/1b4b9422cad28d1bead24ff5fd472536954cfaf9