summaryrefslogtreecommitdiffstats
path: root/src/lib/rpc/svc_tcp.c
diff options
context:
space:
mode:
authorGreg Hudson <ghudson@mit.edu>2014-07-03 12:17:25 -0400
committerGreg Hudson <ghudson@mit.edu>2014-07-04 15:14:02 -0400
commit1fde9a67030845d3cae0661595f5737a4db8b9dd (patch)
tree40a98f75bff979d5c681d21ec45a0ce18a1d3d80 /src/lib/rpc/svc_tcp.c
parentdc04419132e73ec5e38f6680055f1e2e627d42d7 (diff)
downloadkrb5-1fde9a67030845d3cae0661595f5737a4db8b9dd.tar.gz
krb5-1fde9a67030845d3cae0661595f5737a4db8b9dd.tar.xz
krb5-1fde9a67030845d3cae0661595f5737a4db8b9dd.zip
Don't depend on sa_len sockaddr field
In socket-utils.h, replace the socklen macro with an inline function sa_socklen which always uses the address family, even on platforms with the sa_len sockaddr field. This removes the need to set sa_len in socket addresses we construct.
Diffstat (limited to 'src/lib/rpc/svc_tcp.c')
-rw-r--r--src/lib/rpc/svc_tcp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/rpc/svc_tcp.c b/src/lib/rpc/svc_tcp.c
index 7b69c33da..3d0216481 100644
--- a/src/lib/rpc/svc_tcp.c
+++ b/src/lib/rpc/svc_tcp.c
@@ -174,7 +174,7 @@ svctcp_create(
if (bindresvport_sa(sock, sa)) {
sa_setport(sa, 0);
- (void)bind(sock, sa, socklen(sa));
+ (void)bind(sock, sa, sa_socklen(sa));
}
len = sizeof(struct sockaddr_storage);
if (getsockname(sock, sa, &len) != 0) {