Path: utzoo!attcan!uunet!husc6!bunny!cayman!brad From: brad@cayman.COM (Brad Parker) Newsgroups: comp.windows.x Subject: X11R2/SunOS 3.2 + gethostbyname? Message-ID: <1574@cayman.COM> Date: 20 Oct 88 18:58:36 GMT Organization: Cayman Systems Inc., Cambridge Ma Lines: 34 Perhaps I am half a step behind the rest of the world; I was unable to get X11R2 clients built with SunOS 3.2 to work on anything but local (unix) sockets. They would crash in bcopy() from XConnectDisplay() if environment variable DISPLAY was set or "-display xxx:0" was used. I tracked it down to what looks like abberhent behavior of gethostbyname() on Sun's. They seem to return a unsigned long IP address where other machines return a ptr to the same. (struct hostent *)->h_addr (I first noticed this the other day doing a gethostbyname() on a pyramid - it returned a ptr where the sun returned an IP address) This diff to XConnDis.c fixes it on my suns. 185,189d184 < #ifdef SUN < bcopy((char *)&host_ptr->h_addr, < (char *)&inaddr.sin_addr, < sizeof(inaddr.sin_addr)); < #else 193d187 < #endif I assume everyone else in the world has figured this out by now. Perhaps this will help some other lost sole who finally decides to upgrade from X10R4 to X11R2 ;-) -brad -- "What will you do when you wake up one morning to find that God's made you blind in a beautiful person's world and all those great recepies have let you down, and you're twenty and a half and you're not getting age where you go look for the boys 'says I love you lets get married and have kids." -Billy Bragg.