syscalls: use __socklen_t as appropriate
No functional change as __socklen_t is an int.
Obtained from: CheriBSD
Reviewed by: kevans