commit - 9df6f38b45fe96b6b1f5e74b8334d6707176cb45
commit + a117fd101a758954b55adeefed9599ebc41d5bd8
blob - 325ffecbca4bd6e77ea0ea745d8bbd0fc8490b65
blob + 5ba32f3fcccff288621460ea6a7754a3b239b994
--- lib/fetch.c
+++ lib/fetch.c
hints.ai_family = AF_UNSPEC;
hints.ai_socktype = SOCK_STREAM;
eaicode = getaddrinfo(host, port, &hints, &servinfo);
- if (eaicode)
- return got_error_msg(GOT_ERR_ADDRINFO, gai_strerror(eaicode));
+ if (eaicode) {
+ char msg[512];
+ snprintf(msg, sizeof(msg), "%s: %s", host,
+ gai_strerror(eaicode));
+ return got_error_msg(GOT_ERR_ADDRINFO, msg);
+ }
for (p = servinfo; p != NULL; p = p->ai_next) {
if ((fd = socket(p->ai_family, p->ai_socktype,