]> git.ipfire.org Git - thirdparty/git.git/blobdiff - daemon.c
git-daemon not listening when compiled with -DNO_IPV6
[thirdparty/git.git] / daemon.c
index d788167ae0bbce0995329e0263e7082513087441..91b96569cd75c77cd4ee169c55be045daccf3908 100644 (file)
--- a/daemon.c
+++ b/daemon.c
@@ -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