Fix for using AF_INET by default. Otherwise AF_INET6 is used. - geomyidae - A small C-based gopherd. HTML git clone git://bitreich.org/geomyidae/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/geomyidae/ DIR Log DIR Files DIR Refs DIR Tags DIR README DIR LICENSE --- DIR commit 61d8eaf684d3c7751e63e04ad37411b53af101ac DIR parent 3328e3e0954e74d3397246b26a0fcbccc9567e4e HTML 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: M main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- DIR 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); }