Version: 3.5.0-rc1 (using KDE KDE 3.5.0) Installed from: Compiled From Sources Compiler: gcc-3.4.3 Compiler compiled from sources OS: Linux I have the same symptoms as bug 7286. I haven't figured out how to reopen that bug, so I'm creating a new one. My fix was: --- kdelibs-3.5.0/kdeprint/cups/cupsdconf2/cups-util.c~ Sat Sep 10 04:27:41 2005 +++ kdelibs-3.5.0/kdeprint/cups/cupsdconf2/cups-util.c Sun Nov 13 13:51:08 2005 @@ -442,7 +442,7 @@ * See if we are accessing localhost... */ - if (ntohl(http->hostaddr.sin_addr.s_addr) != 0x7f000001 && + if (ntohl(http->hostaddr.ipv4.sin_addr.s_addr) != 0x7f000001 && strcasecmp(http->hostname, "localhost") != 0) return (0); following which, it compiles cleanly.
That should have been bug 72867.
It looks like it, but it isn't the same bug.
SVN commit 480212 by thiago: Do not assume about the internals of struct sockaddr_in. CCBUG:116260 M +1 -1 cups-util.c --- branches/KDE/3.5/kdelibs/kdeprint/cups/cupsdconf2/cups-util.c #480211:480212 @@ -442,7 +442,7 @@ * See if we are accessing localhost... */ - if (ntohl(http->hostaddr.sin_addr.s_addr) != 0x7f000001 && + if (ntohl(*(int*)&http->hostaddr.sin_addr) != 0x7f000001 && strcasecmp(http->hostname, "localhost") != 0) return (0);
SVN commit 480213 by thiago: Forward-porting the bugfix for bug 116260. BUG:116260 BACKPORT:480212 M +1 -1 cups-util.c --- trunk/KDE/kdelibs/kdeprint/cups/cupsdconf2/cups-util.c #480212:480213 @@ -442,7 +442,7 @@ * See if we are accessing localhost... */ - if (ntohl(http->hostaddr.sin_addr.s_addr) != 0x7f000001 && + if (ntohl(*(int*)&http->hostaddr.sin_addr) != 0x7f000001 && strcasecmp(http->hostname, "localhost") != 0) return (0);
On Sunday 13 November 2005 21:09, Thiago Macieira wrote: > Do not assume about the internals of struct sockaddr_in. that doesn't quite work for anything besides IPv4 and only accidentally works on x86. it would be better to use the wrapper that is provided by cups itself (httpAddrLocalhost())
Dirk Mueller wrote: >that doesn't quite work for anything besides IPv4 and only accidentally > works on x86. > >it would be better to use the wrapper that is provided by cups itself >(httpAddrLocalhost()) Maybe, but I don't know the first thing about CUPS, so I wouldn't know that function was there. Unfortunately, IPv4 doesn't provide a function like IPv6's IN6_IS_ADDR_LOOPBACK.
Closing old Resolved status bug.