--- ./configure.ac.unix-addr.patch	2008-03-27 17:10:24.000000000 -0600
+++ ./configure.ac	2008-04-16 17:13:14.000000000 -0600
@@ -1843,6 +1843,7 @@
         arpa/inet.h \
         net/if.h \
         netinet/in.h \
+        sys/un.h \
         netinet/tcp.h \
         netdb.h \
         sys/sockio.h \
@@ -1889,6 +1890,9 @@
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif
+#ifdef HAVE_SYS_UN_H
+#include <sys/un.h>
+#endif
 ]
 )
 
--- ./lib/connect.c.unix-addr.patch	2008-02-07 15:25:04.000000000 -0700
+++ ./lib/connect.c	2008-04-16 17:32:03.000000000 -0600
@@ -34,6 +34,9 @@
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h> /* <netinet/tcp.h> may need it */
 #endif
+#ifdef HAVE_SYS_UN_H
+#include <sys/un.h> /* for sockaddr_un */
+#endif
 #ifdef HAVE_NETINET_TCP_H
 #include <netinet/tcp.h> /* for TCP_NODELAY */
 #endif
@@ -761,13 +764,23 @@
 
   /* FIXME: do we have Curl_printable_address-like with struct sockaddr* as
      argument? */
-  iptoprint = &((const struct sockaddr_in*)(&addr->addr))->sin_addr;
+#ifdef HAVE_SYS_UN_H
+  if(addr->family==AF_UNIX) 
+    infof(data, "  Trying %s... ", 
+          ((const struct sockaddr_un*)(&addr->addr))->sun_path);
+  else {
+#endif 
+    iptoprint = &((const struct sockaddr_in*)(&addr->addr))->sin_addr;
 #ifdef ENABLE_IPV6
-  if(addr->family==AF_INET6)
-    iptoprint= &((const struct sockaddr_in6*)(&addr->addr))->sin6_addr;
+    if(addr->family==AF_INET6)
+      iptoprint= &((const struct sockaddr_in6*)(&addr->addr))->sin6_addr;
 #endif
-  Curl_inet_ntop(addr->family, iptoprint, addr_buf, sizeof(addr_buf));
-  infof(data, "  Trying %s... ", addr_buf);
+    if(Curl_inet_ntop(addr->family, iptoprint, addr_buf, 
+                      sizeof(addr_buf)) != NULL)
+      infof(data, "  Trying %s... ", addr_buf);
+#ifdef HAVE_SYS_UN_H
+  }
+#endif 
 
   if(data->set.tcp_nodelay)
     tcpnodelay(conn, sockfd);

