X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/f3e0acda46a71035ca81f7b352d7b61aa451ee23..0b1df79721bc25a7a5b6281b54af889a9402ec25:/unix/uxnet.c diff --git a/unix/uxnet.c b/unix/uxnet.c index 7b970416..8865d9d5 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 @@ -576,6 +581,7 @@ static int try_connect(Actual_Socket sock) default: assert(0 && "unknown address family"); + exit(1); /* XXX: GCC doesn't understand assert() on some systems. */ } fl = fcntl(s, F_GETFL); @@ -744,9 +750,8 @@ Socket sk_newlistener(char *srcaddr, int port, Plug plug, int local_host_only, i if (a.sin_addr.s_addr != (in_addr_t)(-1)) { /* Override localhost_only with specified listen addr. */ ret->localhost_only = ipv4_is_loopback(a.sin_addr); - got_addr = 1; } - addr = (struct sockaddr *)a; + addr = (struct sockaddr *)&a; addrlen = sizeof(a); retcode = 0; #endif @@ -812,16 +817,6 @@ static void sk_tcp_close(Socket sock) sfree(s); } -#define PUT_32BIT_MSB_FIRST(cp, value) ( \ - (cp)[0] = (char)((value) >> 24), \ - (cp)[1] = (char)((value) >> 16), \ - (cp)[2] = (char)((value) >> 8), \ - (cp)[3] = (char)(value) ) - -#define PUT_16BIT_MSB_FIRST(cp, value) ( \ - (cp)[0] = (char)((value) >> 8), \ - (cp)[1] = (char)(value) ) - void *sk_getxdmdata(void *sock, int *lenp) { Actual_Socket s = (Actual_Socket) sock;