Browse Source

it would appear Solaris does not like variables called 'sun'
(addendum to previous commit which had an empty log message, it was the merge of branches/trac183, unix domain sockets for msgq)


git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@2010 e5f2f494-b856-4b98-b285-d166d9295462

Jelte Jansen 15 years ago
parent
commit
5ce49e93d7
1 changed files with 6 additions and 6 deletions
  1. 6 6
      src/lib/cc/session.cc

+ 6 - 6
src/lib/cc/session.cc

@@ -219,24 +219,24 @@ public:
 
 void
 SocketSession::establish(const char& socket_file) {
-    struct sockaddr_un sun;
+    struct sockaddr_un s_un;
 #ifdef HAVE_SA_LEN
-    sun.sun_len = sizeof(struct sockaddr_un);
+    s_un.sun_len = sizeof(struct sockaddr_un);
 #endif
 
-    if (strlen(&socket_file) >= sizeof(sun.sun_path)) {
+    if (strlen(&socket_file) >= sizeof(s_un.sun_path)) {
         isc_throw(SessionError, "Unable to connect to message queue; "
                   "socket file path too long: " << socket_file);
     }
-    sun.sun_family = AF_UNIX;
-    strncpy(sun.sun_path, &socket_file, sizeof(sun.sun_path) - 1);
+    s_un.sun_family = AF_UNIX;
+    strncpy(s_un.sun_path, &socket_file, sizeof(s_un.sun_path) - 1);
 
     int s = socket(AF_UNIX, SOCK_STREAM, 0);
     if (s < 0) {
         isc_throw(SessionError, "socket() failed");
     }
 
-    if (connect(s, (struct sockaddr *)&sun, sizeof(sun)) < 0) {
+    if (connect(s, (struct sockaddr *)&s_un, sizeof(s_un)) < 0) {
         close(s);
         isc_throw(SessionError, "Unable to connect to message queue");
     }