The getaddrinfo(3) function is not limited to creating IPv4 socket
address structures; IPv6 socket address structures can be created if
IPv6 support is available. These socket address structures can be
used directly by bind(2) or connect(2), to prepare a client or a
server socket.

What should I do to force getaddrinfo to not create IPv6 socket address structures?