summaryrefslogtreecommitdiff
path: root/x11/xtrans/patches/patch-aa
blob: f60e2bfcd0f0fc0679bc150769fa37dcbc27f2bd (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
34
35
36
37
38
39
40
41
42
43
$NetBSD: patch-aa,v 1.4 2008/04/25 18:15:55 joerg Exp $

--- Xtranssock.c.orig	2008-03-06 02:48:42.000000000 +0100
+++ Xtranssock.c
@@ -48,6 +48,7 @@ from the copyright holders.
  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
+#include <sys/stat.h>
 #include <ctype.h>
 #ifdef XTHREADS
 #include <X11/Xthreads.h>
@@ -215,7 +216,7 @@ static int TRANS(SocketINETClose) (Xtran
 
 #ifdef UNIXCONN
 
-#ifdef hpux
+#ifdef __hpux
 
 #if defined(X11_t)
 #define UNIX_PATH "/usr/spool/sockets/X11/"
@@ -286,11 +287,6 @@ static int TRANS(SocketINETClose) (Xtran
  * that don't have IPv6 support.
  */
 #if defined(IPv6) && defined(AF_INET6)
-static const struct in6_addr local_in6addr_any = IN6ADDR_ANY_INIT;
-#pragma weak in6addr_any = local_in6addr_any
-#ifndef __USLC__
-#pragma weak getaddrinfo
-#endif
 static int haveIPv6 = 1;
 #endif
 
@@ -541,6 +537,9 @@ TRANS(SocketReopen) (int i, int type, in
 
     portlen = strlen(port) + 1; // include space for trailing null
 #ifdef BSD44SOCKETS
+#  ifndef SOCK_MAXADDRLEN
+#  define SOCK_MAXADDRLEN 255
+#  endif
     if (portlen < 0 || portlen > (SOCK_MAXADDRLEN + 2)) {
       PRMSG (1, "SocketReopen: invalid portlen %d\n", portlen, 0, 0);
       return NULL;