cpp: Disable IPV6_V6ONLY only if the socket is an AF_INET6 socket

Some systems may disable IPV6 completely.  Ensure that we only disable
IPV6_V6ONLY if the socket is AF_INET6

No longer see the warning:

Thrift: Wed Jul 22 18:08:36 2009 TServerSocket::listen() IPV6_V6ONLY Protocol not available

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@920683 13f79535-47bb-0310-9956-ffa450edef68
2 files changed