summaryrefslogtreecommitdiff
path: root/security/putty/patches/patch-ad
blob: 86fc24f932b01d631da64dbcba71dc3a0aa0e04c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
$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 <netdb.h>
 #include <sys/un.h>
 
+/* This is a hack for solaris, it keeps SIOCATMARK here. */
+#ifndef SIOCATMARK
+#include <sys/sockio.h>
+#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);