diff --git a/include/tr/socket.h b/include/tr/socket.h index af12cc6..65c0d79 100644 --- a/include/tr/socket.h +++ b/include/tr/socket.h @@ -75,12 +75,8 @@ TR_INSTANCE_INIT(TR_Socket); #define TR_socketCname(socket) (((TR_Socket)(socket))->cname) #define TR_socketTtl(socket) (((TR_Socket)(socket))->ttl) -#define TR_socketAddr(socket) \ - (((TR_Socket)(socket))->addr.info.sa_family == AF_INET \ - ? ((TR_Socket)(socket))->addr.in \ - : ((TR_Socket)(socket))->addr.info.sa_family == AF_INET6 \ - ? ((TR_Socket)(socket))->addr.in6 \ - : NULL) +#define TR_socketAddr(socket) \ + ((unsigned char *)&((TR_Socket)(socket))->addr) #define TR_socketAddrlen(socket) (((TR_Socket)(socket))->addrlen) #define TR_socketHandle(socket) (((TR_Socket)(socket))->handle)