]> granicus.if.org Git - libevent/commitdiff
http: do not name variable "sun" since this breaks solaris builds
authorAzat Khuzhin <azat@libevent.org>
Sat, 25 May 2019 20:41:38 +0000 (23:41 +0300)
committerAzat Khuzhin <azat@libevent.org>
Sat, 25 May 2019 20:41:38 +0000 (23:41 +0300)
  -bash-3.2$ /opt/csw/bin/gcc -xc /dev/null -dM -E | grep '#define sun'
  #define sun 1

http.c

diff --git a/http.c b/http.c
index 77abd4267d825fe1612d9b4f7bcb895c0603bcea..0fbed9576f16d1f2d4ef46990baf64eb706eed4d 100644 (file)
--- a/http.c
+++ b/http.c
@@ -4430,8 +4430,8 @@ evhttp_get_request_connection(
 
 #ifdef EVENT__HAVE_STRUCT_SOCKADDR_UN
        if (sa->sa_family == AF_UNIX) {
-               struct sockaddr_un *sun = (struct sockaddr_un *)sa;
-               sun->sun_path[0] = '\0';
+               struct sockaddr_un *sa_un = (struct sockaddr_un *)sa;
+               sa_un->sun_path[0] = '\0';
        }
 #endif