In general, *nix programs need very little porting. Simply follow the installation instructions. If you don't know—and don't know how to find out—the answers to some of the questions asked during the installation procedure, you can guess, but this tends to produce buggy programs. In this case, you're probably better off asking someone else to do the port. If you have a BSD-ish program, you should try using -I/usr/include/bsd and -lbsd
on the appropriate parts of the compilation lines.