Summary: | krfb does not compile if IPv6 not present or on Solaris 7 - patch to fix in description | ||
---|---|---|---|
Product: | [Applications] krfb | Reporter: | Aaron Williams <aaronw> |
Component: | general | Assignee: | tim |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Solaris | ||
Latest Commit: | Version Fixed In: |
Can you please re-post the patch in the unified format (use diff -u)? The problem with the standard diff format is that I need exactly the same source to apply it. Maybe that it because the last patch wasnt applied correctly - I had to guess where to do the changes. Subject: Re: krfb does not compile if IPv6 not present or on Solaris 7 - patch to fix in description Note that the file ending in ~ is the old file. diff -u kinetaddr.h~ kinetaddr.h --- kinetaddr.h~ Mon Aug 12 04:26:39 2002 +++ kinetaddr.h Wed Jan 29 14:21:16 2003 @@ -114,14 +114,16 @@ * This will be NULL if this is not a v6 address. * @see addressV4 */ +#ifdef AF_INET6 const struct in6_addr* addressV6() const; +#endif operator const struct in_addr*() const { return addressV4(); } - +#ifdef AF_INET6 operator const struct in6_addr*() const { return addressV6(); } - +#endif /** * Returns an address that can be used for communication with * other computers on the internet. diff -u kinetaddr.cpp~ kinetaddr.cpp --- kinetaddr.cpp~ Sat Oct 26 15:21:58 2002 +++ kinetaddr.cpp Wed Jan 29 14:20:47 2003 @@ -33,7 +33,9 @@ #include <klocale.h> #include "kinetaddr.h" #include <netdb.h> - +#ifdef sun +#include <sys/socket.h> +#endif #if defined(__osf__) && defined(AF_INET6) #undef AF_INET6 #endif @@ -137,7 +139,7 @@ { char buf[INET6_ADDRSTRLEN+1]; // INET6_ADDRSTRLEN > INET_ADDRSTRLEN -#ifdef __osf__ +#if defined(__osf__) || defined(sun) if (d->sockfamily == AF_INET) { char *p = inet_ntoa(d->in); strncpy(buf, p, sizeof(buf)); tim@tjansen.de wrote: >------- You are receiving this mail because: ------- >You reported the bug, or are watching the reporter. > >http://bugs.kde.org/show_bug.cgi?id=53620 >tim@tjansen.de changed: > > What |Removed |Added >---------------------------------------------------------------------------- > Status|UNCONFIRMED |ASSIGNED > everconfirmed|0 |1 > > > >------- Additional Comments From tim@tjansen.de 2003-01-30 10:53 ------- >Can you please re-post the patch in the unified format (use diff -u)? The problem >with the standard diff format is that I need exactly the same source to apply it. >Maybe that it because the last patch wasnt applied correctly - I had to guess where >to do the changes. > > Thanks. The kinetaddr.cpp changes were already in the 3.1 branch, but not the kinetaddr.h changes. There has been a change in this file between 3.1 and 3.1.1 which causes it to fail. The function definition header for the following function is not being preprocessed with AF_INET6: const struct in6_addr *KInetAddress::addressV6() const { The body of the function is being preprocessed, but this line is not. in6_addr is NOT AVAILABLE on Solaris 2.6. Diffing between this file and the same file from KDE 3.1 shows that in 3.1 the whole function was preprocessed out. I believe the header file is appropriately handling this. Thanks, should compile now. |
Version: (using KDE KDE 3.1) Installed from: Compiled From Sources Compiler: gcc 2.95.3 Ultrasparc, Solaris 2.7 OS: Solaris This was previously reported as resolved, but the bug has cropped up again. Here are the patches necessary to get krfb to compile when IPv6 is unavailable, such as on Solaris 7: diff kinetaddr.cpp.new kinetaddr.cpp 36,38c36 < #ifdef sun < #include <sys/socket.h> < #endif --- > 142c140 < #if defined(__osf__) || defined(sun) --- > #ifdef __osf__ diff kinetaddr.h.new kinetaddr.h 117d116 < #ifdef AF_INET6 119d117 < #endif 123c121 < #ifdef AF_INET6 --- > 126c124 < #endif --- >