summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorweingart <>1998-01-11 19:32:10 +0000
committerweingart <>1998-01-11 19:32:10 +0000
commit5a4b430a51a73c805d5b876a4a19e85a3b0f6879 (patch)
tree94c66f94638ae487fb2fe48b21914639cc9f0a29
parentc4dc32ffa30805a4ab2bbb7da986e82faa64508a (diff)
downloadopenbsd-5a4b430a51a73c805d5b876a4a19e85a3b0f6879.tar.gz
openbsd-5a4b430a51a73c805d5b876a4a19e85a3b0f6879.tar.bz2
openbsd-5a4b430a51a73c805d5b876a4a19e85a3b0f6879.zip
Add gethostent(), as some LEGACY code wants it. If you write new
code, PLEASE don't use this. Currently only iterates through the local /etc/hosts file.
-rw-r--r--src/lib/libc/net/gethostnamadr.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lib/libc/net/gethostnamadr.c b/src/lib/libc/net/gethostnamadr.c
index 82eebd251d..b11bff6b86 100644
--- a/src/lib/libc/net/gethostnamadr.c
+++ b/src/lib/libc/net/gethostnamadr.c
@@ -52,7 +52,7 @@
52 */ 52 */
53 53
54#if defined(LIBC_SCCS) && !defined(lint) 54#if defined(LIBC_SCCS) && !defined(lint)
55static char rcsid[] = "$OpenBSD: gethostnamadr.c,v 1.27 1997/11/08 20:46:56 deraadt Exp $"; 55static char rcsid[] = "$OpenBSD: gethostnamadr.c,v 1.28 1998/01/11 19:32:10 weingart Exp $";
56#endif /* LIBC_SCCS and not lint */ 56#endif /* LIBC_SCCS and not lint */
57 57
58#include <sys/param.h> 58#include <sys/param.h>
@@ -1019,6 +1019,12 @@ map_v4v6_hostent(hp, bpp, lenp)
1019 } 1019 }
1020} 1020}
1021 1021
1022struct hostent *
1023gethostent()
1024{
1025 return (_gethtent());
1026}
1027
1022#ifdef RESOLVSORT 1028#ifdef RESOLVSORT
1023static void 1029static void
1024addrsort(ap, num) 1030addrsort(ap, num)