[kde-solaris] Kdenetwork 1.1.1 / krfb on Sparc/Solaris9 compilation failure

Tobias Oetiker kde-solaris@mail.kde.org
Sun Mar 30 11:20:09 2003


Yesterday Lars Tunkrans wrote:

>
>
> In     /kdenetwork-3.1.1/krfb/srvloc
>
> Two new Ifdefs are inserted in kinetaddr.h as
> compared to the same file in KDE 3.1
>
>
> # diff ORG-kinetaddr.h kinetaddr.h
> 117d116
> < #ifdef AF_INET6
> 119d117
> < #endif
> 123d120
> < #ifdef AF_INET6
> 126d122
> < #endif
> #
>
> These makes compilation fail  on  SPARC / SOALRIS 9 12/02
> and GCC 3.2.2

The following patch fixes this

--- krfb/srvloc/kinetaddr.cpp~  Sun Mar  2 20:08:35 2003
+++ krfb/srvloc/kinetaddr.cpp   Fri Mar 21 22:18:21 2003
@@ -143,7 +143,7 @@
 {
        char buf[INET6_ADDRSTRLEN+1];   // INET6_ADDRSTRLEN > INET_ADDRSTRLEN

-#ifdef __osf__ || defined(sun)
+#if defined(__osf__) || defined(sun)
        if (d->sockfamily == AF_INET) {
            char *p = inet_ntoa(d->in);
            strncpy(buf, p, sizeof(buf));



--- krfb/srvloc/kinetaddr.h~    Sun Mar  2 20:08:35 2003
+++ krfb/srvloc/kinetaddr.h     Sat Mar 22 15:49:21 2003
@@ -29,7 +29,7 @@

 #include <arpa/inet.h>

-#if defined(__FreeBSD__)
+#if defined(__FreeBSD__) || defined(sun)
 #include <sys/socket.h>
 #endif



You can find my full compile recipe in
http://computing.ee.ethz.ch/sepp/kde-3.1.1-to.SEPP

The INSTALL script will not run unaltered on your box, but it is quite readable ...

cheers
tobi


>
> # gmake
> source='kinetaddr.cpp' object='kinetaddr.lo' libtool=yes \
> depfile='.deps/kinetaddr.Plo' tmpdepfile='.deps/kinetaddr.TPlo' \
> depmode=gcc3 /bin/bash ../../admin/depcomp \
> /bin/bash ../../libtool --silent --mode=compile --tag=CXX g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I/usr/local/kde/include -I/usr/local/qt/include    -DQT_THREAD_SUPPORT -I/usr/sfw/include
> -I/opt/sfw/include -I/usr/local/include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_SOLARIS -DSVR4 -D_FILE_OFFSET_BITS=64  -Wnon-virtual-dtor -Wno-long-long -Wundef -Wall -pedantic -W
> -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -O2 -O3 -mcpu=ultrasparc -mtune=ultrasparc -Wa,-xarch=v8plusa -fno-exceptions -fno-check-new -DQT_NO_COMPAT -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST
> -DKDE_NO_COMPAT -DKDE_NO_COMPAT_H  -c -o kinetaddr.lo `test -f 'kinetaddr.cpp' || echo './'`kinetaddr.cpp
> kinetaddr.cpp:132: no `const in6_addr* KInetAddress::addressV6() const' member
>     function declared in class `KInetAddress'
> kinetaddr.cpp:146:16: warning: extra tokens at end of #ifdef directive
> gmake: *** [kinetaddr.lo] Error 1
>
>
>
>
>
>

-- 
 ______    __   _
/_  __/_  / /  (_) Oetiker @ ISG.EE, ETZ J97, ETH, CH-8092 Zurich
 / // _ \/ _ \/ /  System Manager, Time Lord, Coder, Designer, Coach
/_/ \.__/_.__/_/   http://people.ee.ethz.ch/~oetiker   +41(0)1-632-5286