git-daemon not listening when compiled with -DNO_IPV6

git-daemon was not listening when compiled with -DNO_IPV6.
socksetup() was not returning socket count when compiled with -DNO_IPV6.

Signed-off-by: Paul Serice <paul@serice.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
maint
Paul Serice 2005-11-21 11:07:23 -06:00 committed by Junio C Hamano
parent ef07618fdd
commit f35230fb11
1 changed files with 6 additions and 0 deletions

View File

@ -466,8 +466,14 @@ static int socksetup(int port, int **socklist_p)
return 0;
}

if (listen(sockfd, 5) < 0) {
close(sockfd);
return 0;
}

*socklist_p = xmalloc(sizeof(int));
**socklist_p = sockfd;
return 1;
}

#endif