summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: fdc1211)
raw | patch | inline | side by side (parent: fdc1211)
author | Erik Faye-Lund <kusmabite@gmail.com> | |
Thu, 4 Nov 2010 01:35:22 +0000 (02:35 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 4 Nov 2010 23:53:52 +0000 (16:53 -0700) |
Windows's accept()-function takes the last argument as an int, but glibc
takes an unsigned int. Use socklen_t to get rid of a warning. This is
basically a revert of 7fa0908, but we have already been depending on
socklen_t existing since June 2006 (commit 5b276ee4). I guess this means
that socklen_t IS defined on OSX after all - at least in recent headers.
Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
takes an unsigned int. Use socklen_t to get rid of a warning. This is
basically a revert of 7fa0908, but we have already been depending on
socklen_t existing since June 2006 (commit 5b276ee4). I guess this means
that socklen_t IS defined on OSX after all - at least in recent headers.
Signed-off-by: Erik Faye-Lund <kusmabite@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
daemon.c | patch | blob | history |
diff --git a/daemon.c b/daemon.c
index 8162f10ffc40523321ae0bd9cda7eb1cf535bfb6..a4d3e91ef65c9b7695cc39dab21787efc379dcea 100644 (file)
--- a/daemon.c
+++ b/daemon.c
struct sockaddr_storage address;
} *firstborn;
-static void add_child(struct child_process *cld, struct sockaddr *addr, int addrlen)
+static void add_child(struct child_process *cld, struct sockaddr *addr, socklen_t addrlen)
{
struct child *newborn, **cradle;
}
static char **cld_argv;
-static void handle(int incoming, struct sockaddr *addr, int addrlen)
+static void handle(int incoming, struct sockaddr *addr, socklen_t addrlen)
{
struct child_process cld = { 0 };
char addrbuf[300] = "REMOTE_ADDR=", portbuf[300];
struct sockaddr_in6 sai6;
#endif
} ss;
- unsigned int sslen = sizeof(ss);
+ socklen_t sslen = sizeof(ss);
int incoming = accept(pfd[i].fd, &ss.sa, &sslen);
if (incoming < 0) {
switch (errno) {