From: Qball Cow Date: Wed, 17 Dec 2008 14:14:32 +0000 (+0100) Subject: Rename variable sun as it is predefined (to 1) on solaris X-Git-Tag: release-0.13~57 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=61b081d64d4135698b56f63c931da60c64511e3c;p=ncmpc.git Rename variable sun as it is predefined (to 1) on solaris --- diff --git a/src/resolver.c b/src/resolver.c index e5df05c..f6f1c89 100644 --- a/src/resolver.c +++ b/src/resolver.c @@ -69,7 +69,7 @@ struct resolver { struct resolver_address current; #ifndef WIN32 - struct sockaddr_un sun; + struct sockaddr_un saun; #endif }; @@ -85,18 +85,18 @@ resolver_new(const char *host, int port) #ifndef WIN32 if (host[0] == '/') { size_t path_length = strlen(host); - if (path_length >= sizeof(resolver->sun.sun_path)) { + if (path_length >= sizeof(resolver->saun.sun_path)) { free(resolver); return NULL; } - resolver->sun.sun_family = AF_UNIX; - memcpy(resolver->sun.sun_path, host, path_length + 1); + resolver->saun.sun_family = AF_UNIX; + memcpy(resolver->saun.sun_path, host, path_length + 1); resolver->current.family = PF_UNIX; resolver->current.protocol = 0; - resolver->current.addrlen = sizeof(resolver->sun); - resolver->current.addr = (const struct sockaddr *)&resolver->sun; + resolver->current.addrlen = sizeof(resolver->saun); + resolver->current.addr = (const struct sockaddr *)&resolver->saun; resolver->type = TYPE_ONE; } else { #endif