I found some ifdefs that referenced __FreeBSD. I had to change them to __FreeBSD__. Even though nosunos4.h attempts to define howmany() it doesn't get defined for FreeBSD. Also, there was an instance of howmany() in a source file that didn't include nosunos4.h.