Path: utzoo!yunexus!geac!syntron!jtsv16!uunet!auspex!guy From: guy@auspex.UUCP (Guy Harris) Newsgroups: comp.windows.x Subject: Re: X11R2/SunOS 3.2 + gethostbyname? Message-ID: <293@auspex.UUCP> Date: 23 Oct 88 22:19:36 GMT Article-I.D.: auspex.293 References: <1574@cayman.COM> <7153@ut-emx.UUCP> Reply-To: guy@auspex.UUCP (Guy Harris) Organization: Auspex Systems, Santa Clara Lines: 13 >I'd check your version of netdb.h to see if it treats the h_addr field >in a hostent struct as a char * (SunOS 3.4, static host table lookup) >or a char ** (4.3 BSD, BIND name server). Or, more precisely, as a "char *" (4.2BSD) or a "char **" (4.3BSD). The code in the 4.3BSD is: char **h_addr_list; /* list of addresses from name server */ #define h_addr h_addr_list[0] /* address, for backward compatiblity */ SunOS 4.0 has the 4.3BSD-style (regardless of whether you use -lresolv to go directly to BIND, or use the standard -lc "gethost*" to go through "/etc/hosts" and YP and get to BIND through the YP server).