[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: gethostby{name,addr}_r

> At 01:32 PM 1/6/99 -0800, Robert Christ wrote:
> >Hello,
> >I've noticed a small problem on digital unix 4.0.  DU supplies the
> >functions gethostbyname_r and gethostbyaddr_r in libc but these
> >functions do not conform to the prototypes used in
> >libraries/libldap/util-int.c.  Configure finds the functions and
> >defines HAVE_GETHOSTBY{NAME,ADDR}_R which causes bad things to
> >happen.  I recompiled after undefining those constants and things are
> >working for me.
> What are the prototypes on your system for:
> 	gethostbyaddr_r()
> 	gethostbyname_r()
> 	ctime_r()
> Thanks, Kurt

I have had this problem on Solaris 2.5 and 2.5.1 as well.
Here are the prototypes:

struct hostent *gethostbyname_r(const char *name,
          struct hostent *result, char *buffer, int buflen,
          int *h_errnop);

struct hostent *gethostbyaddr_r(const char *addr,
          int length, int type, struct hostent *result,
          char *buffer,  int buflen, int *h_errnop);