summaryrefslogtreecommitdiff
path: root/lib/curl_addrinfo.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2014-12-10 13:12:26 +0100
committerDaniel Stenberg <daniel@haxx.se>2014-12-10 13:13:31 +0100
commit1cc5194337b1b9a77ec35f557d27ed97d086dfb2 (patch)
tree410a95165e137607e75b5bf7f67bf10ac767caf1 /lib/curl_addrinfo.c
parent0da4524a2204931df0862b42fcab31bdb63674a9 (diff)
downloadcurl-1cc5194337b1b9a77ec35f557d27ed97d086dfb2.tar.gz
Curl_unix2addr: avoid using the variable name 'sun'
I suspect this causes compile failures on Solaris: Bug: http://curl.haxx.se/mail/lib-2014-12/0081.html
Diffstat (limited to 'lib/curl_addrinfo.c')
-rw-r--r--lib/curl_addrinfo.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/curl_addrinfo.c b/lib/curl_addrinfo.c
index b8032f4df..f28361062 100644
--- a/lib/curl_addrinfo.c
+++ b/lib/curl_addrinfo.c
@@ -488,7 +488,7 @@ Curl_addrinfo *Curl_str2addr(char *address, int port)
Curl_addrinfo *Curl_unix2addr(const char *path)
{
Curl_addrinfo *ai;
- struct sockaddr_un *sun;
+ struct sockaddr_un *sa_un;
size_t path_len;
ai = calloc(1, sizeof(Curl_addrinfo));
@@ -500,7 +500,7 @@ Curl_addrinfo *Curl_unix2addr(const char *path)
}
/* sun_path must be able to store the NUL-terminated path */
path_len = strlen(path);
- if(path_len >= sizeof(sun->sun_path)) {
+ if(path_len >= sizeof(sa_un->sun_path)) {
free(ai->ai_addr);
free(ai);
return NULL;
@@ -509,9 +509,9 @@ Curl_addrinfo *Curl_unix2addr(const char *path)
ai->ai_family = AF_UNIX;
ai->ai_socktype = SOCK_STREAM; /* assume reliable transport for HTTP */
ai->ai_addrlen = (curl_socklen_t) sizeof(struct sockaddr_un);
- sun = (void *) ai->ai_addr;
- sun->sun_family = AF_UNIX;
- memcpy(sun->sun_path, path, path_len + 1); /* copy NUL byte */
+ sa_un = (void *) ai->ai_addr;
+ sa_un->sun_family = AF_UNIX;
+ memcpy(sa_un->sun_path, path, path_len + 1); /* copy NUL byte */
return ai;
}
#endif