Replace inet_addr()/inet_aton() with a call to inet_pton()
We unconditionally require inet_pton() for our IPv6 check so let's use the same call for the IPv4 check too. This removes the need for inet_aton() which is labelled as deprecated because it doesn't support IPv4.
cc @alanc - any idea on the overlap of "has inet_aton() but does not have inet_pton()" is?