when compiling the netbsd version of disklabel, you need to use all of the relevant netbsd header files. most of the ones which refer to io you should use the ultrix ones, those which refer to netbsd specific structures (the disklabel format being one) you should use the netbsd files.