[master] 7ac98ce6c Get the correct error string for EAI_SYSTEM

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Thu Feb 20 20:31:11 UTC 2020


commit 7ac98ce6c82089f4d59b378184218031d0f40c40
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date:   Thu Feb 20 20:46:21 2020 +0100

    Get the correct error string for EAI_SYSTEM

diff --git a/lib/libvarnish/vss.c b/lib/libvarnish/vss.c
index 24056c4da..9feb7c584 100644
--- a/lib/libvarnish/vss.c
+++ b/lib/libvarnish/vss.c
@@ -131,7 +131,9 @@ vss_resolve(const char *addr, const char *def_port, int family, int socktype,
 	ret = getaddrinfo(hp, def_port, &hints, res);
 	free(p);
 
-	if (ret != 0)
+	if (ret == EAI_SYSTEM)
+		*errp = vstrerror(errno);
+	else if (ret != 0)
 		*errp = gai_strerror(ret);
 
 	return (ret);


More information about the varnish-commit mailing list