Include <limits.h> for PATH_MAX.
Stricter check for raw socket support.
Avoid using a variable named "sun". Solaris doesn't like it.