dns: fix build warnings when compiling without ipv6