summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Cristau <jcristau@debian.org>2008-03-23 19:43:32 +0100
committerJulien Cristau <jcristau@debian.org>2008-03-23 19:52:29 +0100
commit3de3e666e0653d4e8ae23fc3e6e31864ddad4059 (patch)
treede079eb95bf30ed4c066a0fe90778053b761e30c
parent662994b9096181117cec4cae88f24bf6da806159 (diff)
downloadxorg-lib-libxtrans-3de3e666e0653d4e8ae23fc3e6e31864ddad4059.tar.gz
BSD44SOCKETS is the wrong check for SOCK_MAXADDRLEN
GNU/kFreeBSD defines BSD44SOCKETS, but doesn't have SOCK_MAXADDRLEN. Check for the latter directly.
-rw-r--r--Xtranssock.c4
1 files changed, 2 insertions, 2 deletions
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)