This commit was generated by cvs2svn to compensate for changes in r5086,
[chise/xemacs-chise.git] / src / process-unix.c
index 462fb55..df7e824 100644 (file)
@@ -1587,7 +1587,11 @@ unix_canonicalize_host_name (Lisp_Object host)
 
   xzero (hints);
   hints.ai_flags = AI_CANONNAME;
+#ifdef IPV6_CANONICALIZE
   hints.ai_family = AF_UNSPEC;
+#else
+  hints.ai_family = PF_INET;
+#endif
   hints.ai_socktype = SOCK_STREAM;
   hints.ai_protocol = 0;
   LISP_STRING_TO_EXTERNAL (host, ext_host, Qnative);
@@ -1764,6 +1768,7 @@ unix_open_network_stream (Lisp_Object name, Lisp_Object host, Lisp_Object servic
 
            failed_connect = 1;
            close (s);
+           s = -1;
 
            speed_up_interrupts ();