From 61b081d64d4135698b56f63c931da60c64511e3c Mon Sep 17 00:00:00 2001 From: Qball Cow Date: Wed, 17 Dec 2008 15:14:32 +0100 Subject: [PATCH] Rename variable sun as it is predefined (to 1) on solaris --- src/resolver.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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 -- 2.30.2