summaryrefslogtreecommitdiffstats
path: root/bsd-rresvport.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2001-01-25 10:32:00 +1100
committerDamien Miller <djm@mindrot.org>2001-01-25 10:32:00 +1100
commit2a5c1cede026faec14b0903a0cdcc4e7ef554e32 (patch)
tree2534f2a4499b295d01521a5fe90aa1ba9eeb9146 /bsd-rresvport.c
parent12aaa04e96be85a684d3f90db46bb62689796a93 (diff)
- (djm) Sync bsd-* support files:
- deraadt@cvs.openbsd.org 2000/01/26 03:43:20 [rresvport.c bindresvport.c] new bindresvport() semantics that itojun, shin, jean-luc and i have agreed on, which will be happy for the future. bindresvport_sa() for sockaddr *, too. docs later.. - deraadt@cvs.openbsd.org 2000/01/24 02:24:21 [bindresvport.c] in bindresvport(), if sin is non-NULL, example sin->sin_family for the actual family being processed
Diffstat (limited to 'bsd-rresvport.c')
-rw-r--r--bsd-rresvport.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/bsd-rresvport.c b/bsd-rresvport.c
index 392768c0..44eac203 100644
--- a/bsd-rresvport.c
+++ b/bsd-rresvport.c
@@ -38,7 +38,7 @@
#ifndef HAVE_RRESVPORT_AF
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: rresvport.c,v 1.4 1999/12/17 20:48:03 deraadt Exp $";
+static char *rcsid = "$OpenBSD: rresvport.c,v 1.5 2000/01/26 03:43:20 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
#include "includes.h"
@@ -94,7 +94,8 @@ rresvport_af(int *alport, sa_family_t af)
}
*portp = 0;
- if (bindresvport_af(s, sa, af) == -1) {
+ sa->sa_family = af;
+ if (bindresvport_sa(s, sa) == -1) {
(void)close(s);
return (-1);
}