Summary: | Compile failure of kdelibs with cups-1.2svn | ||
---|---|---|---|
Product: | [Unmaintained] kdeprint | Reporter: | Christopher Neufeld <kdebugs> |
Component: | general | Assignee: | KDEPrint Devel Mailinglist <kde-print-devel> |
Status: | CLOSED FIXED | ||
Severity: | normal | CC: | jlayt |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Christopher Neufeld
2005-11-13 20:30:43 UTC
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. |