>David is correct. h_errno is defined as extern int in >gethostnamadr.c. As such, it's inappropriate to define it with >that malloc. I suppose the malloc does compile because a >pointer type is also an int. > >You're also somewhat correct because the Be version of >h_errno is not int. It's also not * int though, at least in >netdb.h. >It is defined as a macro, #define'd to a call to a no-argument >function, _h_errnop. This is similar to the definition of errno >in errno.h. > >Andrew > What is the appropriate way to do it? The malloc call compiles, and fixes the segmentation violations. The code is failing when attempting to assign values (i.e h_errno = NETDB_SUCCESS)to h_errno... Thanks, Brennan