]> git.openpandora.org Git - openembedded.git/commitdiff
classpath: Added patch fixing build on newer GCCs (and prevents a bug).
authorRobert Schuster <thebohemian@gmx.net>
Thu, 10 Jul 2008 15:59:04 +0000 (15:59 +0000)
committerRobert Schuster <thebohemian@gmx.net>
Thu, 10 Jul 2008 15:59:04 +0000 (15:59 +0000)
packages/classpath/classpath_0.95.bb
packages/classpath/classpath_0.96.1.bb
packages/classpath/classpath_0.97.2.bb
packages/classpath/files/javanet-local.patch [new file with mode: 0644]

index 0b2090f72f7e70338010201b8441eb23f5e3feb2..45ce04f519a8d35cf77a378c8d7408670e70e0e3 100644 (file)
@@ -3,9 +3,10 @@ require classpath.inc
 SRC_URI += "\
   file://gjar-prefix-patch.diff;patch=1;pnum=0 \
   file://xmlstream-fix.patch;patch=1;pnum=0 \
+  file://javanet-local.patch;patch=1;pnum=0 \
   "
 
-PR = "r3"
+PR = "r4"
 
 DEPENDS += "gtk+ gconf libxtst"
 
index 9d347a0303258764ee678db25f52bd8b4cb5f1e1..6952cda72f4633c948bf9c59440b4b0b1d5a3a41 100644 (file)
@@ -3,9 +3,10 @@ require classpath.inc
 SRC_URI += "\
   file://gjar-prefix-patch.diff;patch=1;pnum=0 \
   file://xmlstream-fix.patch;patch=1;pnum=0 \
+  file://javanet-local.patch;patch=1;pnum=0 \
   "
 
-PR = "r5"
+PR = "r6"
 
 DEPENDS += "gtk+ gconf libxtst"
 
index 338ebcf0d487262caa814ad77e1795cf4f8c4e59..fafe0bbb8868badcbaf5464c50821da483d3f4f4 100644 (file)
@@ -3,9 +3,10 @@ require classpath.inc
 SRC_URI += "\
   file://netif_16.patch;patch=1;pnum=0 \
   file://SimpleName.diff;patch=1;pnum=0 \
+  file://javanet-local;patch=1;pnum=0 \
   "
 
-PR = "r0"
+PR = "r1"
 
 DEPENDS += "gtk+ gconf libxtst"
 
diff --git a/packages/classpath/files/javanet-local.patch b/packages/classpath/files/javanet-local.patch
new file mode 100644 (file)
index 0000000..b8d1584
--- /dev/null
@@ -0,0 +1,37 @@
+Index: native/jni/java-net/local.c
+===================================================================
+RCS file: /sources/classpath/classpath/native/jni/java-net/local.c,v
+retrieving revision 1.4
+diff -u -r1.4 local.c
+--- native/jni/java-net/local.c        17 Apr 2007 21:46:27 -0000      1.4
++++ native/jni/java-net/local.c        27 Jun 2008 13:14:40 -0000
+@@ -73,27 +73,18 @@
+   return socket (PF_UNIX, stream ? SOCK_STREAM : SOCK_DGRAM, 0);
+ }
+ 
+-static int gcc_sucks = 0;
+-
+ int
+ local_bind (int fd, const char *addr)
+ {
+   struct sockaddr_un saddr;
+ 
+-  /* For some reason, GCC 4.0.1 on Darwin/x86 MODIFIES the `addr'
+-     pointer in the CALLER's STACK FRAME after calling this function,
+-     but if we add this statement below, it doesn't!  */
+-  if (gcc_sucks)
+-    fprintf (stderr, "bind %p\n", addr);
+-
+-  if (strlen (addr) > sizeof (saddr.sun_path))
++  if (strlen (addr) >= sizeof (saddr.sun_path))
+     {
+       errno = ENAMETOOLONG;
+       return -1;
+     }
+ 
+-  strncpy (saddr.sun_path, addr, sizeof (saddr.sun_path));
+-  saddr.sun_path[sizeof (saddr.sun_path)] = '\0';
++  strcpy (saddr.sun_path, addr);
+   saddr.sun_family = AF_LOCAL;
+ 
+   return bind (fd, (struct sockaddr *) &saddr, SUN_LEN (&saddr));