diff options
| author | deraadt <> | 2000-01-26 03:43:20 +0000 |
|---|---|---|
| committer | deraadt <> | 2000-01-26 03:43:20 +0000 |
| commit | a81d0ed41c3ead390c00ec1dc26d1cb777ce296e (patch) | |
| tree | 894a71e965a40b0de50c546b0dde15eb0a13886f | |
| parent | 491da67336fdc0379b22f2665dd04fb1d4036f6c (diff) | |
| download | openbsd-a81d0ed41c3ead390c00ec1dc26d1cb777ce296e.tar.gz openbsd-a81d0ed41c3ead390c00ec1dc26d1cb777ce296e.tar.bz2 openbsd-a81d0ed41c3ead390c00ec1dc26d1cb777ce296e.zip | |
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..
| -rw-r--r-- | src/lib/libc/net/rresvport.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/libc/net/rresvport.c b/src/lib/libc/net/rresvport.c index 21387aa3b1..c807adfb83 100644 --- a/src/lib/libc/net/rresvport.c +++ b/src/lib/libc/net/rresvport.c | |||
| @@ -34,7 +34,7 @@ | |||
| 34 | */ | 34 | */ |
| 35 | 35 | ||
| 36 | #if defined(LIBC_SCCS) && !defined(lint) | 36 | #if defined(LIBC_SCCS) && !defined(lint) |
| 37 | static char *rcsid = "$OpenBSD: rresvport.c,v 1.4 1999/12/17 20:48:03 deraadt Exp $"; | 37 | static char *rcsid = "$OpenBSD: rresvport.c,v 1.5 2000/01/26 03:43:20 deraadt Exp $"; |
| 38 | #endif /* LIBC_SCCS and not lint */ | 38 | #endif /* LIBC_SCCS and not lint */ |
| 39 | 39 | ||
| 40 | #include <sys/param.h> | 40 | #include <sys/param.h> |
| @@ -108,7 +108,8 @@ rresvport_af(alport, af) | |||
| 108 | } | 108 | } |
| 109 | 109 | ||
| 110 | *portp = 0; | 110 | *portp = 0; |
| 111 | if (bindresvport_af(s, sa, af) == -1) { | 111 | sa->sa_family = af; |
| 112 | if (bindresvport_sa(s, sa) == -1) { | ||
| 112 | (void)close(s); | 113 | (void)close(s); |
| 113 | return (-1); | 114 | return (-1); |
| 114 | } | 115 | } |
