summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3e48af3)
raw | patch | inline | side by side (parent: 3e48af3)
author | Alex Riesen <raa.lkml@gmail.com> | |
Tue, 12 Jun 2007 20:52:10 +0000 (22:52 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 16 Jun 2007 16:11:58 +0000 (09:11 -0700) |
Randal L. Schwartz noticed compilation problems on SunOS, which made
me look at the code again. The thing is, h_errno is not used by
connect(2), it is only for functions from netdb.h, like gethostbyname.
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
me look at the code again. The thing is, h_errno is not used by
connect(2), it is only for functions from netdb.h, like gethostbyname.
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
connect.c | patch | blob | history |
diff --git a/connect.c b/connect.c
index 7fab9c0fd961af54a5758e8452391ff7a5e2e9bd..a5afd2a5361d840347eb64a3a73db9d8dcbd1057 100644 (file)
--- a/connect.c
+++ b/connect.c
}
if (connect(sockfd, ai->ai_addr, ai->ai_addrlen) < 0) {
saved_errno = errno;
- fprintf(stderr, "%s[%d: %s]: net=%s, errno=%s\n",
+ fprintf(stderr, "%s[%d: %s]: errno=%s\n",
host,
cnt,
ai_name(ai),
- hstrerror(h_errno),
strerror(saved_errno));
close(sockfd);
sockfd = -1;
if (connect(sockfd, (struct sockaddr *)&sa, sizeof sa) < 0) {
saved_errno = errno;
- fprintf(stderr, "%s[%d: %s]: net=%s, errno=%s\n",
+ fprintf(stderr, "%s[%d: %s]: errno=%s\n",
host,
cnt,
inet_ntoa(*(struct in_addr *)&sa.sin_addr),
- hstrerror(h_errno),
strerror(saved_errno));
close(sockfd);
sockfd = -1;