Fix GCC build.
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 338450436d9d691a18fb94373c58e91aa3fcb374)