summaryrefslogtreecommitdiff
path: root/recipes/classpath/files/javanet-local.patch
diff options
context:
space:
mode:
authorDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
committerDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
commit709c4d66e0b107ca606941b988bad717c0b45d9b (patch)
tree37ee08b1eb308f3b2b6426d5793545c38396b838 /recipes/classpath/files/javanet-local.patch
parentfa6cd5a3b993f16c27de4ff82b42684516d433ba (diff)
rename packages/ to recipes/ per earlier agreement
See links below for more details: http://thread.gmane.org/gmane.comp.handhelds.openembedded/21326 http://thread.gmane.org/gmane.comp.handhelds.openembedded/21816 Signed-off-by: Denys Dmytriyenko <denis@denix.org> Acked-by: Mike Westerhof <mwester@dls.net> Acked-by: Philip Balister <philip@balister.org> Acked-by: Khem Raj <raj.khem@gmail.com> Acked-by: Marcin Juszkiewicz <hrw@openembedded.org> Acked-by: Koen Kooi <koen@openembedded.org> Acked-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Diffstat (limited to 'recipes/classpath/files/javanet-local.patch')
-rw-r--r--recipes/classpath/files/javanet-local.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/recipes/classpath/files/javanet-local.patch b/recipes/classpath/files/javanet-local.patch
new file mode 100644
index 0000000000..b8d1584e7c
--- /dev/null
+++ b/recipes/classpath/files/javanet-local.patch
@@ -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));