[kaffe] CVS kaffe (dalibor): Fixed compilation under powerpc-darwin

Kaffe CVS Kaffe Mailing List <kaffe@kaffe.org>
Thu Oct 30 00:18:02 2003


PatchSet 4138 
Date: 2003/10/30 08:16:02
Author: dalibor
Branch: HEAD
Tag: (none) 
Log:
Fixed compilation under powerpc-darwin

Build still breaks during class library compile, though

Members: 
	ChangeLog:1.1730->1.1731 
	libraries/clib/net/PlainDatagramSocketImpl.c:1.31->1.32 
	libraries/clib/net/PlainSocketImpl.c:1.34->1.35 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.1730 kaffe/ChangeLog:1.1731
--- kaffe/ChangeLog:1.1730	Wed Oct 29 20:15:43 2003
+++ kaffe/ChangeLog	Thu Oct 30 08:16:02 2003
@@ -1,3 +1,10 @@
+2003-10-30  Dalibor Topic <robilad@kaffe.org>
+
+	* libraries/clib/net/PlainSocketImpl.c,
+	libraries/clib/net/PlainDatagramSocketImpl.c:
+	(ip62str) Use s6_addr to access bytes in address
+	struct. Fixes compilation on powerpc-darwin.
+	
 2003-10-29  Dalibor Topic <robilad@kaffe.org>
 
 	* libraries/javalib/essential.files:
Index: kaffe/libraries/clib/net/PlainDatagramSocketImpl.c
diff -u kaffe/libraries/clib/net/PlainDatagramSocketImpl.c:1.31 kaffe/libraries/clib/net/PlainDatagramSocketImpl.c:1.32
--- kaffe/libraries/clib/net/PlainDatagramSocketImpl.c:1.31	Tue Oct 28 12:29:32 2003
+++ kaffe/libraries/clib/net/PlainDatagramSocketImpl.c	Thu Oct 30 08:16:05 2003
@@ -96,15 +96,15 @@
 	for (count=0,i=0;i<16;i++) {
 	    char *format;
 	    
-	    if (i == 0 && addr->in6_u.u6_addr8[i] != 0)
+	    if (i == 0 && addr->s6_addr[i] != 0)
 	      format = "%x";
-	    else if (addr->in6_u.u6_addr8[i] != 0)
+	    else if (addr->s6_addr[i] != 0)
 	      format = "%x:";
 	    else if (i != 0)
 	      format = ":";
 	    else
 	      format = "";
-	    count += sprintf(&addrbuf[count], format, addr->in6_u.u6_addr8[i]);
+	    count += sprintf(&addrbuf[count], format, addr->s6_addr[i]);
 	}
 	return addrbuf;
 }
Index: kaffe/libraries/clib/net/PlainSocketImpl.c
diff -u kaffe/libraries/clib/net/PlainSocketImpl.c:1.34 kaffe/libraries/clib/net/PlainSocketImpl.c:1.35
--- kaffe/libraries/clib/net/PlainSocketImpl.c:1.34	Tue Oct 28 12:29:32 2003
+++ kaffe/libraries/clib/net/PlainSocketImpl.c	Thu Oct 30 08:16:05 2003
@@ -114,15 +114,15 @@
 	for (count=0,i=0;i<16;i++) {
 	    char *format;
 	    
-	    if (i == 0 && addr->in6_u.u6_addr8[i] != 0)
+	    if (i == 0 && addr->s6_addr[i] != 0)
 	      format = "%x";
-	    else if (addr->in6_u.u6_addr8[i] != 0)
+	    else if (addr->s6_addr[i] != 0)
 	      format = "%x:";
 	    else if (i != 0)
 	      format = ":";
 	    else
 	      format = "";
-	    count += sprintf(&addrbuf[count], format, addr->in6_u.u6_addr8[i]);
+	    count += sprintf(&addrbuf[count], format, addr->s6_addr[i]);
 	}
 	return addrbuf;
 }