Fix getsockopt call.