Code

Rename variable sun as it is predefined (to 1) on solaris
authorQball Cow <qball@sarine.nl>
Wed, 17 Dec 2008 14:14:32 +0000 (15:14 +0100)
committerMax Kellermann <max@duempel.org>
Wed, 17 Dec 2008 21:17:15 +0000 (22:17 +0100)
src/resolver.c

index e5df05ce56fcdcefb767e5fb189954db6ecb7bc3..f6f1c8984836e108658ae4a31f29558887129bb3 100644 (file)
@@ -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