Subject: lib/15591: gethostent - does it exist or not?
To: None <>
From: None <>
List: netbsd-bugs
Date: 02/13/2002 02:40:38
>Number:         15591
>Category:       lib
>Synopsis:       gethostent is not in libc (where it should be acc. to man) , but prototype remains in /usr/include/netdb.h
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    lib-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Feb 12 17:41:01 PST 2002
>Originator:     Lasse Hillerĝe Petersen
>Release:        NetBSD 1.5.1
	Just being myself
System: NetBSD 1.5.2 NetBSD 1.5.2 (GENERIC_LAPTOP) #3: Sat Aug 18 23:43:41 CEST 2001 i386

It seems gethostent() has been removed from libc at some point in time. However, it remains documented in a manpage, and a
prototype remains in /usr/include/netdb.h

I stumbled upon this while trying to use my just compiled native jdk-1.3.1. A simple hello program ran fine, but a program 
that used jdbc complained about gethostent being an undefined symbol.

cc -x c - <<END
#include <netdb.h>

main() {
        (void) gethostent();

Well, undo the disabling in libc or fix the headers and the manpage. I tried to fix the source file
/usr/src/lib/libc/net/gethnamaddr.c by amending the relevant #if, but I haven't succeeded. I think I
prefer fixing libc to making the appropriate fix to the JDK source. :-)

But for this problem, it seems the JDK works OK.
I had hoped getting Tomcat running on a native JVM tonight though - no such luck, and now it's 0230 in
the morning :-( *GOODNIGHT*