From 3de3e666e0653d4e8ae23fc3e6e31864ddad4059 Mon Sep 17 00:00:00 2001 From: Julien Cristau Date: Sun, 23 Mar 2008 19:43:32 +0100 Subject: BSD44SOCKETS is the wrong check for SOCK_MAXADDRLEN GNU/kFreeBSD defines BSD44SOCKETS, but doesn't have SOCK_MAXADDRLEN. Check for the latter directly. --- Xtranssock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Xtranssock.c') diff --git a/Xtranssock.c b/Xtranssock.c index 94b73e2..8a7d2ec 100644 --- a/Xtranssock.c +++ b/Xtranssock.c @@ -540,7 +540,7 @@ TRANS(SocketReopen) (int i, int type, int fd, char *port) } portlen = strlen(port) + 1; // include space for trailing null -#ifdef BSD44SOCKETS +#ifdef SOCK_MAXADDRLEN if (portlen < 0 || portlen > (SOCK_MAXADDRLEN + 2)) { PRMSG (1, "SocketReopen: invalid portlen %d\n", portlen, 0, 0); return NULL; @@ -551,7 +551,7 @@ TRANS(SocketReopen) (int i, int type, int fd, char *port) PRMSG (1, "SocketReopen: invalid portlen %d\n", portlen, 0, 0); return NULL; } -#endif /*BSD44SOCKETS*/ +#endif /*SOCK_MAXADDRLEN*/ if ((ciptr = (XtransConnInfo) xcalloc ( 1, sizeof(struct _XtransConnInfo))) == NULL) -- cgit v1.2.3