Nvi2 fails to build on Illumos, due to a lack of the openpty function and no libutil.
Admittedly, I am unsure if there is a workaround for this, as the Porting guide in the wiki states that it is a requirement.
A search in the illumos-gate GitHub repo shows no references to openpty at all, save for a few libc tests, and this bug report has been open for 10 years in relation to a lack of openpty(3C) function.
I don't know if this is in the scope of adding a workaround for nvi2, but I feel it is worth documenting here in the event someone else comes across this bug.