Sync with upstream r1.8

"sys/types.h rather than sys/param.h, where applicable.  avoid
overreach."

/deraadt@/

(cherry picked from commit c88e1e2c0fec947fb9f1470d79c6dddcfd6f303f)