Fix build errors with clang and GCC 6.
Add a few patches to fix several different build errors that prevented the port
from building with GCC 6 (which uses C++14 by default) as well as clang from
base.
PR: 219294
Approved by: maintainer timeout (amdmi3, 17 days)