Changes needed by newer Illumos code

These are all of the commits needed to support newer Illumos code. I am opening this pull request for comments.