[Kde-nonlinux] Re: Fwd: Re: Compiling on Solaris 2.6

Waldo Bastian kde-nonlinux@kde.org
Tue, 19 Feb 2002 21:10:47 -0800


--------------Boundary-00=_ZPFT8K90AV4FEMDWLK2O
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

On Saturday 16 February 2002 11:53 am, Simon Josefsson wrote:
> Still, kdenetwork doesn't compile as Solaris 2.6 doesn't have
> inet_aton().  I'm not sure how you want to solve it..

Does the following patch work? It compiles but I haven't been able to act=
ually=20
test it.

> In file included from libkcm_lanbrowser_la.all_cpp.cpp:3:
> ../../../kdenetwork/lanbrowsing/kcmlisa/setupwizard.cpp: In method `voi=
d
> SetupWizard::generateLisaConfigInfo(QString)':
> ../../../kdenetwork/lanbrowsing/kcmlisa/setupwizard.cpp:523: implicit
> declaration of function `int inet_aton(...)' make[1]: ***
> [libkcm_lanbrowser_la.all_cpp.lo] Error 1
> make[1]: Leaving directory
> `/afs/pdc.kth.se/home/j/jas/src/kde/kdenetwork-o/lanbrowsing/kcmlisa' m=
ake:
> *** [all-recursive] Error 1
> my$

Cheers,
Waldo
--=20
Advanced technology only happens when people take a basic idea and add to=
 it.
 -- Bob Bemer

--------------Boundary-00=_ZPFT8K90AV4FEMDWLK2O
Content-Type: text/x-diff;
  charset="iso-8859-1";
  name="kcmlisa.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="kcmlisa.patch"

Index: setupwizard.cpp
===================================================================
RCS file: /home/kde/kdenetwork/lanbrowsing/kcmlisa/setupwizard.cpp,v
retrieving revision 1.6
diff -u -r1.6 setupwizard.cpp
--- setupwizard.cpp	2002/01/07 06:55:59	1.6
+++ setupwizard.cpp	2002/02/20 05:10:01
@@ -24,7 +24,7 @@
 
 #include <klocale.h>
 #include <kdialog.h>
-
+#include <ksockaddr.h>
 #include <kdebug.h>
 
 #include <sys/socket.h>
@@ -520,7 +520,7 @@
       mask=mask.left(mask.length()-1);
 
    in_addr inetMask;
-   inet_aton(mask.latin1(),&inetMask);
+   KInetSocketAddress::stringToAddr(AF_INET, mask.latin1(), &inetMask);
    int tmp=ntohl(inetMask.s_addr);
    //if the host part is less than 20 bits simply take it
    //this might be a problem on 64 bit machines

--------------Boundary-00=_ZPFT8K90AV4FEMDWLK2O--