patches to compile on Solaris

Michael Ritzert kde at
Thu Mar 24 22:42:27 GMT 2005

Hi all,

I'm trying to build current KDE CVS HEAD on i386-pc-solaris2.10 using gcc
Most of qt-copy and kdelibs compiled just fine so far. I just needed
a few changes to rename variables that collided with #define's from the
system headers. One example is this:

Index: dnssd/publicservice.cpp
RCS file: /home/kde/kdelibs/dnssd/publicservice.cpp,v
retrieving revision 1.23
diff -u -3 -p -r1.23 publicservice.cpp
--- dnssd/publicservice.cpp	23 Mar 2005 10:25:30 -0000	1.23
+++ dnssd/publicservice.cpp	24 Mar 2005 22:34:51 -0000
@@ -169,9 +169,9 @@ const KURL PublicService::toInvitation(c
 	KURL url;
 	if (host.isEmpty()) { // select best address
-		unsigned long s_addr = publicIP();
-		if (!s_addr) return KURL();
-		KNetwork::KIpAddress addr(s_addr);
+		unsigned long s_address = publicIP();
+		if (!s_address) return KURL();
+		KNetwork::KIpAddress addr(s_address);
 	} else 	url.setHost(host);
 	//FIXME: if there is no public interface, select any non-loopback

where s_addr is defined to _S_un._S_addr in /usr/include/netinet/in.h.

Is it ok to check in these minimal changes (I do have a CVS account)?
Or is the preferred way to use
#ifdef s_addr
#  undef s_addr


More information about the kde-core-devel mailing list