There is a missing include that breaks the build. The fix has already landed upstream and should be included in main tree. https://github.com/sudo-project/sudo/commit/f4e9e4337f8844d199515ff2b762c914dd254cbd
Versions in ::gentoo released upstream since now work.