geomyidae

A small C-based gopherd. (gopher://bitreich.org/1/scm/geomyidae)
git clone git://r-36.net/geomyidae
Log | Files | Refs | README | LICENSE

commit 61d8eaf684d3c7751e63e04ad37411b53af101ac
parent 3328e3e0954e74d3397246b26a0fcbccc9567e4e
Author: Christoph Lohmann <20h@r-36.net>
Date:   Sun, 11 Nov 2018 11:00:57 +0100

Fix for using AF_INET by default. Otherwise AF_INET6 is used.

Diffstat:
main.c | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/main.c b/main.c @@ -303,11 +303,11 @@ getlistenfd(struct addrinfo *hints, char *bindip, char *port) void *sinaddr; int on, reqaf, listfd, aierr, errno_save; - if ((reqaf = hints->ai_family) == AF_UNSPEC) - hints->ai_family = AF_INET6; + reqaf = hints->ai_family; if ((aierr = getaddrinfo(bindip, port, hints, &ai)) || ai == NULL) { - fprintf(stderr, "getaddrinfo: %s\n", gai_strerror(aierr)); + fprintf(stderr, "getaddrinfo (%s:%s): %s\n", bindip, port, + gai_strerror(aierr)); exit(1); }