diff options
author | Bart Massey <bart@cs.pdx.edu> | 2007-11-24 14:53:54 -0800 |
---|---|---|
committer | Bart Massey <bart@cs.pdx.edu> | 2007-11-24 14:53:54 -0800 |
commit | 9bf8329b50a8edacf00efb074f73c3bb759f7c8d (patch) | |
tree | a67ddc901305b62315a0ae2f034576ec93dc9440 /src/xcb_auth.c | |
parent | 0593989103c48cc10165066d985c9f2d3355926b (diff) |
make IPv6 optional
Diffstat (limited to 'src/xcb_auth.c')
-rw-r--r-- | src/xcb_auth.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/xcb_auth.c b/src/xcb_auth.c index ffc0515..3f24690 100644 --- a/src/xcb_auth.c +++ b/src/xcb_auth.c @@ -93,6 +93,7 @@ static Xauth *get_authptr(struct sockaddr *sockname, unsigned int socknamelen, family = FamilyLocal; /* 256 */ switch(sockname->sa_family) { +#ifdef AF_INET6 case AF_INET6: addr = (char *) SIN6_ADDR(sockname); addrlen = sizeof(*SIN6_ADDR(sockname)); @@ -104,6 +105,7 @@ static Xauth *get_authptr(struct sockaddr *sockname, unsigned int socknamelen, } addr += 12; /* if v4-mapped, fall through. */ +#endif case AF_INET: if(!addr) addr = (char *) &((struct sockaddr_in *)sockname)->sin_addr; @@ -179,6 +181,7 @@ static int compute_auth(xcb_auth_info_t *info, Xauth *authptr, struct sockaddr * APPEND(info->data, j, si->sin_port); } break; +#ifdef AF_INET6 case AF_INET6: /*block*/ { struct sockaddr_in6 *si6 = (struct sockaddr_in6 *) sockname; @@ -199,6 +202,7 @@ static int compute_auth(xcb_auth_info_t *info, Xauth *authptr, struct sockaddr * } } break; +#endif case AF_UNIX: /*block*/ { uint32_t fakeaddr = htonl(0xffffffff - next_nonce()); |