diff options
Diffstat (limited to 'source4/heimdal/lib/roken/socket.c')
-rw-r--r-- | source4/heimdal/lib/roken/socket.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/source4/heimdal/lib/roken/socket.c b/source4/heimdal/lib/roken/socket.c index a373eb7ed2..ab1b7ff344 100644 --- a/source4/heimdal/lib/roken/socket.c +++ b/source4/heimdal/lib/roken/socket.c @@ -31,10 +31,7 @@ * SUCH DAMAGE. */ -#ifdef HAVE_CONFIG_H #include <config.h> -RCSID("$Id$"); -#endif #include "roken.h" #include <err.h> @@ -152,17 +149,17 @@ socket_sockaddr_size (const struct sockaddr *sa) */ void * ROKEN_LIB_FUNCTION -socket_get_address (struct sockaddr *sa) +socket_get_address (const struct sockaddr *sa) { switch (sa->sa_family) { case AF_INET : { - struct sockaddr_in *sin4 = (struct sockaddr_in *)sa; - return &sin4->sin_addr; + const struct sockaddr_in *sin4 = (const struct sockaddr_in *)sa; + return rk_UNCONST(&sin4->sin_addr); } #ifdef HAVE_IPV6 case AF_INET6 : { - struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)sa; - return &sin6->sin6_addr; + const struct sockaddr_in6 *sin6 = (const struct sockaddr_in6 *)sa; + return rk_UNCONST(&sin6->sin6_addr); } #endif default : |