]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Rename sun to s_un in test_addr.c
authorNick Mathewson <nickm@torproject.org>
Thu, 6 Feb 2014 17:36:33 +0000 (12:36 -0500)
committerNick Mathewson <nickm@torproject.org>
Thu, 6 Feb 2014 17:36:33 +0000 (12:36 -0500)
Apparently the compiler on solaris 9 didn't like "sun" as an identifier.

Fix for bug 10565; bugfix on 0.2.5.1-alpha.

changes/bug10565 [new file with mode: 0644]
src/test/test_addr.c

diff --git a/changes/bug10565 b/changes/bug10565
new file mode 100644 (file)
index 0000000..9fef9d4
--- /dev/null
@@ -0,0 +1,3 @@
+  o Minor bugfixes:
+    - Fix compilation on Solaris 9, which didn't like us to have an
+      identifier namd "sun". Fixes bug 10565; bugfix in 0.2.5.1-alpha.
index 4bc602df842446f76d0570612d23af8a4eb23220..79ddd95090a8eda9ba11a752e9dc64ea0243850e 100644 (file)
@@ -899,7 +899,7 @@ test_addr_sockaddr_to_str(void *arg)
   struct sockaddr_in6 sin6;
   struct sockaddr_storage ss;
 #ifdef HAVE_SYS_UN_H
-  struct sockaddr_un sun;
+  struct sockaddr_un s_un;
 #endif
 #define CHECK(sa, s) do {                                       \
     v = tor_sockaddr_to_str((const struct sockaddr*) &(sa));    \
@@ -919,10 +919,10 @@ test_addr_sockaddr_to_str(void *arg)
   CHECK(sin, "127.128.128.1:1234");
 
 #ifdef HAVE_SYS_UN_H
-  memset(&sun,0,sizeof(sun));
-  sun.sun_family = AF_UNIX;
-  strlcpy(sun.sun_path, "/here/is/a/path", sizeof(sun.sun_path));
-  CHECK(sun, "unix:/here/is/a/path");
+  memset(&s_un,0,sizeof(s_un));
+  s_un.sun_family = AF_UNIX;
+  strlcpy(s_un.sun_path, "/here/is/a/path", sizeof(s_un.sun_path));
+  CHECK(s_un, "unix:/here/is/a/path");
 #endif
 
   memset(&sin6,0,sizeof(sin6));