summaryrefslogtreecommitdiff
path: root/bsd-rresvport.c
diff options
context:
space:
mode:
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 392768c02..44eac2036 100644
--- a/bsd-rresvport.c
+++ b/bsd-rresvport.c
@@ -38,7 +38,7 @@
38#ifndef HAVE_RRESVPORT_AF 38#ifndef HAVE_RRESVPORT_AF
39 39
40#if defined(LIBC_SCCS) && !defined(lint) 40#if defined(LIBC_SCCS) && !defined(lint)
41static char *rcsid = "$OpenBSD: rresvport.c,v 1.4 1999/12/17 20:48:03 deraadt Exp $"; 41static char *rcsid = "$OpenBSD: rresvport.c,v 1.5 2000/01/26 03:43:20 deraadt Exp $";
42#endif /* LIBC_SCCS and not lint */ 42#endif /* LIBC_SCCS and not lint */
43 43
44#include "includes.h" 44#include "includes.h"
@@ -94,7 +94,8 @@ rresvport_af(int *alport, sa_family_t af)
94 } 94 }
95 95
96 *portp = 0; 96 *portp = 0;
97 if (bindresvport_af(s, sa, af) == -1) { 97 sa->sa_family = af;
98 if (bindresvport_sa(s, sa) == -1) {
98 (void)close(s); 99 (void)close(s);
99 return (-1); 100 return (-1);
100 } 101 }