home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!sun-barr!olivea!news.bbn.com!testament.bbn.com!cjross
- From: cjross@bbn.com (Chris Ross)
- Newsgroups: comp.lang.perl
- Subject: gethostbyname() crash in pl 4.035 under SunOS 4.1.?
- Message-ID: <lb7s03INNjqt@news.bbn.com>
- Date: 14 Sep 92 01:50:59 GMT
- Reply-To: cjross@bbn.com (Chris Ross)
- Organization: Bolt Beranek and Newman Inc., Cambridge MA
- Lines: 21
- NNTP-Posting-Host: bbn.com
-
-
- 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.
-
-
- chris ross <cjross@bbn.com> BBN Advanced Simulations (617) 873-3272
- WARNING: article may contain flammable material. Do not expose to open
- flames. In case of accidental ignition, douse keyboard with water.
-