X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/putty/blobdiff_plain/8815b68b87e4bc4830d138fb259f8255230fe954..4afa6d8290c522a64507936e26f7b6fd2a3d7540:/unix/uxnet.c diff --git a/unix/uxnet.c b/unix/uxnet.c index 31b12921..3cf1b5f0 100644 --- a/unix/uxnet.c +++ b/unix/uxnet.c @@ -22,6 +22,11 @@ #include "network.h" #include "tree234.h" +/* Solaris needs for SIOCATMARK. */ +#ifndef SIOCATMARK +#include +#endif + #ifndef X11_UNIX_PATH # define X11_UNIX_PATH "/tmp/.X11-unix/X" #endif @@ -686,7 +691,10 @@ Socket sk_newlistener(char *srcaddr, int port, Plug plug, int local_host_only, i * into local reality. */ address_family = (address_family == ADDRTYPE_IPV4 ? AF_INET : - address_family == ADDRTYPE_IPV6 ? AF_INET6 : AF_UNSPEC); +#ifndef NO_IPV6 + address_family == ADDRTYPE_IPV6 ? AF_INET6 : +#endif + AF_UNSPEC); #ifndef NO_IPV6 /* Let's default to IPv6. @@ -702,11 +710,13 @@ Socket sk_newlistener(char *srcaddr, int port, Plug plug, int local_host_only, i */ s = socket(address_family, SOCK_STREAM, 0); +#ifndef NO_IPV6 /* If the host doesn't support IPv6 try fallback to IPv4. */ if (s < 0 && address_family == AF_INET6) { address_family = AF_INET; s = socket(address_family, SOCK_STREAM, 0); } +#endif if (s < 0) { ret->error = strerror(errno);