gethostbyname() crash in pl 4.035 under SunOS 4.1.?
doio.c, lines 1738-1744 read as follows:
if (which == O_GHBYNAME) {
#ifdef h_addr
str_nset(str, *hent->h_addr, hent->h_length);
#else
str_nset(str, hent->h_addr, hent->h_length);
#endif
Sun's <netdb.h> defines h_addr as
#define h_addr h_addr_list[0] /* address, for backward compatiblity */
h_addr_list is dereferenced by both <netdb.h> and perl, which results
in a char being passed to str_nset. I've no idea which is at fault.
The obvious quick fix works.
WARNING: article may contain flammable material. Do not expose to open
flames. In case of accidental ignition, douse keyboard with water.