diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2000-01-24 02:24:22 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2000-01-24 02:24:22 +0000 |
commit | c9d6628503ef49fdc2e537f96c78c2d3174a0fe7 (patch) | |
tree | 97206cff5089385ee8b3069a0f1f18a285e3c6e0 /lib/libc/rpc | |
parent | 77f2f4ff4353febfa4fc3bba52d53e221925e1f6 (diff) |
in bindresvport(), if sin is non-NULL, example sin->sin_family for the actual family being processed
Diffstat (limited to 'lib/libc/rpc')
-rw-r--r-- | lib/libc/rpc/bindresvport.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libc/rpc/bindresvport.c b/lib/libc/rpc/bindresvport.c index d30ef7b4d3b..37789e9d786 100644 --- a/lib/libc/rpc/bindresvport.c +++ b/lib/libc/rpc/bindresvport.c @@ -28,7 +28,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: bindresvport.c,v 1.11 1999/12/17 19:22:08 deraadt Exp $"; +static char *rcsid = "$OpenBSD: bindresvport.c,v 1.12 2000/01/24 02:24:21 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ /* @@ -51,7 +51,9 @@ bindresvport(sd, sin) int sd; struct sockaddr_in *sin; { - return bindresvport_af(sd, (struct sockaddr *)sin, AF_INET); + if (sin) + return bindresvport_af(sd, (struct sockaddr *)sin, sin->sin_family); + return bindresvport_af(sd, NULL, AF_INET); } /* |