diff options
Diffstat (limited to 'src/lib/libc/net/sethostent.c')
-rw-r--r-- | src/lib/libc/net/sethostent.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/lib/libc/net/sethostent.c b/src/lib/libc/net/sethostent.c index 00f6499695..5392a2f11b 100644 --- a/src/lib/libc/net/sethostent.c +++ b/src/lib/libc/net/sethostent.c | |||
@@ -1,5 +1,3 @@ | |||
1 | /* $NetBSD: sethostent.c,v 1.4 1995/02/25 06:21:03 cgd Exp $ */ | ||
2 | |||
3 | /* | 1 | /* |
4 | * Copyright (c) 1985, 1993 | 2 | * Copyright (c) 1985, 1993 |
5 | * The Regents of the University of California. All rights reserved. | 3 | * The Regents of the University of California. All rights reserved. |
@@ -34,11 +32,7 @@ | |||
34 | */ | 32 | */ |
35 | 33 | ||
36 | #if defined(LIBC_SCCS) && !defined(lint) | 34 | #if defined(LIBC_SCCS) && !defined(lint) |
37 | #if 0 | 35 | static char rcsid[] = "$OpenBSD: sethostent.c,v 1.4 1997/03/15 21:53:50 pefo Exp $"; |
38 | static char sccsid[] = "@(#)sethostent.c 8.1 (Berkeley) 6/4/93"; | ||
39 | #else | ||
40 | static char rcsid[] = "$NetBSD: sethostent.c,v 1.4 1995/02/25 06:21:03 cgd Exp $"; | ||
41 | #endif | ||
42 | #endif /* LIBC_SCCS and not lint */ | 36 | #endif /* LIBC_SCCS and not lint */ |
43 | 37 | ||
44 | #include <sys/param.h> | 38 | #include <sys/param.h> |
@@ -49,7 +43,11 @@ static char rcsid[] = "$NetBSD: sethostent.c,v 1.4 1995/02/25 06:21:03 cgd Exp $ | |||
49 | 43 | ||
50 | void | 44 | void |
51 | sethostent(stayopen) | 45 | sethostent(stayopen) |
46 | int stayopen; | ||
52 | { | 47 | { |
48 | |||
49 | if ((_res.options & RES_INIT) == 0 && res_init() == -1) | ||
50 | return; | ||
53 | if (stayopen) | 51 | if (stayopen) |
54 | _res.options |= RES_STAYOPEN | RES_USEVC; | 52 | _res.options |= RES_STAYOPEN | RES_USEVC; |
55 | } | 53 | } |
@@ -58,5 +56,5 @@ void | |||
58 | endhostent() | 56 | endhostent() |
59 | { | 57 | { |
60 | _res.options &= ~(RES_STAYOPEN | RES_USEVC); | 58 | _res.options &= ~(RES_STAYOPEN | RES_USEVC); |
61 | _res_close(); | 59 | res_close(); |
62 | } | 60 | } |