Structure addrinfo description in "man getaddrinfo" page does not match with /usr/include/netdb.h - ai_addr and ai_commonname swithed each other. Looks like man page was copied from Linux.
A commit references this bug: Author: pluknet Date: Sun Feb 10 19:07:47 UTC 2019 New revision: 343967 URL: https://svnweb.freebsd.org/changeset/base/343967 Log: Sync "struct addrinfo" declaration with netdb.h. Notably, unlike in OpenBSD, which the man page was copied from, ai_canonname and ai_addr come in different order. PR: 225880 MFC after: 1 week Changes: head/lib/libc/net/getaddrinfo.3
A commit references this bug: Author: pluknet Date: Wed Feb 20 11:58:41 UTC 2019 New revision: 344358 URL: https://svnweb.freebsd.org/changeset/base/344358 Log: MFC r343967: Sync "struct addrinfo" declaration with netdb.h. PR: 225880 Changes: _U stable/12/ stable/12/lib/libc/net/getaddrinfo.3