Use statvfs on NetBSD.

One field name in struct statvfs is different than one Solaris; adapt.
Fixes build on NetBSD, since statfs support was removed.
Add cast.

Fixes
root.c:1987:36: error: initialization makes pointer from integer without a cast [-Werror]
with gcc-4.8.3 on NetBSD.
Add casts.

Fixes
error: array subscript has type ‘char’
with gcc-4.8.3 on NetBSD.

See the CAVEATS section in
http://netbsd.gw.com/cgi-bin/man-cgi?ctype+3+NetBSD-current
for an explanation what the problem with "type 'char'" is.
Cast udata to void *.

Another method to get rid of the warning, suggested by Wez Furlong.
Use uint8_t instead of "unsigned char" to keep line length down.

Suggested by Wez Furlong.
Do not use statvfs on OS X.

The statvfs interface there does not provide the wanted information.
Consistently use uint8_t in casts.

Requested by Wez Furlong.