Define __APPLE_USER_RFC_2292 so the IPv6 socket options are exposed on OSX
Set errno appropriately if we're building without IPv6 support and an IPv6 socket is requested
Remove redundant includes of netinet/in.h