fix the type issue for getsockopt calls