fig2dev uses _setmode if it exists, and basically uses its existence as check if it's running on Windows/DOS. However, NetBSD also provides _setmode and then compilation breaks horribly.
Please improve the check; perhaps checking for the existence of io.h instead.
Thanks for pointing out the issue. Since I do not compile on NetBSD, your observations are very valuable. This issue will be fixed in the next release.