}
#else
#error "No IPv6 address conversion function."
-#endif
addr->sin6_family = AF_INET6;
addr->sin6_port = port;
+#endif
+
#endif /* SIPC_IPV6 */
} else {
parts[1] = Tcl_NewIntObj(addr->sin6_port);
#else
Tcl_SetObjResult(interp,
- Tcl_NewStringObj("error: ipv6 not supported in this build"));
+ Tcl_NewStringObj("error: ipv6 not supported in this build", -1));
return TCL_ERROR;
#endif
} else {
statePtr->sock = sock;
getsockname(sock, (struct sockaddr *)&name, &len);
- if (name.ss_family == AF_INET) {
+ if (((struct sockaddr *)&name)->sa_family == AF_INET) {
((struct sockaddr_in *)&statePtr->saddr_local)->sin_addr.s_addr
= INADDR_NONE;
((struct sockaddr_in *)&statePtr->saddr_remote)->sin_addr.s_addr