Author: wyoung
Date: Sat Jul 26 21:14:22 2008
New Revision: 2321

URL: http://svn.gna.org/viewcvs/mysqlpp?rev=2321&view=rev
Log:
Fixed test/uds.cpp build errors on Solaris 10.  No functional change.

Modified:
    trunk/test/uds.cpp

Modified: trunk/test/uds.cpp
URL: 
http://svn.gna.org/viewcvs/mysqlpp/trunk/test/uds.cpp?rev=2321&r1=2320&r2=2321&view=diff
==============================================================================
--- trunk/test/uds.cpp (original)
+++ trunk/test/uds.cpp Sat Jul 26 21:14:22 2008
@@ -37,6 +37,9 @@
 #include <sys/stat.h>
 #include <sys/socket.h>
 #include <sys/un.h>
+#if !defined(AF_LOCAL)
+#      define AF_LOCAL AF_UNIX
+#endif
 
 #include <errno.h>
 
@@ -59,12 +62,12 @@
        }
        
        // Bind the socket to the named file
-       struct sockaddr_un sun;
-       memset(&sun, 0, sizeof(sun));
-       sun.sun_family = AF_LOCAL;
-       strncpy(sun.sun_path, path, sizeof(sun.sun_path));
-       sun.sun_path[sizeof(sun.sun_path) - 1] = '\0';
-       if (bind(fd, reinterpret_cast<sockaddr*>(&sun), sizeof(sun)) < 0) {
+       struct sockaddr_un saun;
+       memset(&saun, 0, sizeof(saun));
+       saun.sun_family = AF_LOCAL;
+       strncpy(saun.sun_path, path, sizeof(saun.sun_path));
+       saun.sun_path[sizeof(saun.sun_path) - 1] = '\0';
+       if (bind(fd, reinterpret_cast<sockaddr*>(&saun), sizeof(saun)) < 0) {
                return -1;
        }
 


_______________________________________________
Mysqlpp-commits mailing list
[email protected]
https://mail.gna.org/listinfo/mysqlpp-commits

Reply via email to