resolver: check for AF_UNIX before getnameinfo.

Avoid a potential access of uninitilaized value.