$NetBSD: patch-ad,v 1.3 2011/12/10 20:50:51 cheusov Exp $ --- unix/uxnet.c.orig 2006-12-09 15:44:31.000000000 +0000 +++ unix/uxnet.c @@ -17,6 +17,15 @@ #include #include +/* This is a hack for solaris, it keeps SIOCATMARK here. */ +#ifndef SIOCATMARK +#include +#endif +/* For Unix flavors that don't define INADDR_NONE */ +#ifndef INADDR_NONE +#define INADDR_NONE 0xffffffff +#endif + #define DEFINE_PLUG_METHOD_MACROS #include "putty.h" #include "network.h" @@ -448,10 +457,10 @@ static int try_connect(Actual_Socket soc #endif struct sockaddr_in a; struct sockaddr_un au; - const struct sockaddr *sa; + const struct sockaddr *sa = NULL; int err = 0; short localport; - int fl, salen; + int fl, salen = 0; if (sock->s >= 0) close(sock->s);