aboutsummaryrefslogtreecommitdiffstats
path: root/src/resolver.c
diff options
context:
space:
mode:
authorQball Cow <qball@sarine.nl>2008-12-17 15:14:32 +0100
committerMax Kellermann <max@duempel.org>2008-12-17 22:17:15 +0100
commit61b081d64d4135698b56f63c931da60c64511e3c (patch)
treebab79a9d9f84b4114954549f7563b2cbad2db764 /src/resolver.c
parentcd60f00430fa6a35dcc85fd2b914a39eda0ae67f (diff)
downloadmpd-61b081d64d4135698b56f63c931da60c64511e3c.tar.gz
mpd-61b081d64d4135698b56f63c931da60c64511e3c.tar.xz
mpd-61b081d64d4135698b56f63c931da60c64511e3c.zip
Rename variable sun as it is predefined (to 1) on solaris
Diffstat (limited to 'src/resolver.c')
-rw-r--r--src/resolver.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/resolver.c b/src/resolver.c
index e5df05ce5..f6f1c8984 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