diff options
author | Henning Heinold <heinold@inf.fu-berlin.de> | 2011-11-12 20:58:34 +0100 |
---|---|---|
committer | Henning Heinold <heinold@inf.fu-berlin.de> | 2011-11-26 23:41:44 +0100 |
commit | 57e069cde6617f00ca8834a82c6f360af43d5067 (patch) | |
tree | 48cbe15e96d217c45acfa64b0c13aad8c6424980 /recipes-core/classpath/classpath-0.98/javanet-local.patch | |
download | meta-java-57e069cde6617f00ca8834a82c6f360af43d5067.tar.gz |
meta-java: initial commit
* taken over mostly stuff from oe classic
* cleaned up recipes
* added license checksums
* bump icedtea6-native to 1.8.11
* use jamvm from git as native
Diffstat (limited to 'recipes-core/classpath/classpath-0.98/javanet-local.patch')
-rw-r--r-- | recipes-core/classpath/classpath-0.98/javanet-local.patch | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/recipes-core/classpath/classpath-0.98/javanet-local.patch b/recipes-core/classpath/classpath-0.98/javanet-local.patch new file mode 100644 index 0000000..b8d1584 --- /dev/null +++ b/recipes-core/classpath/classpath-0.98/javanet-local.patch | |||
@@ -0,0 +1,37 @@ | |||
1 | Index: native/jni/java-net/local.c | ||
2 | =================================================================== | ||
3 | RCS file: /sources/classpath/classpath/native/jni/java-net/local.c,v | ||
4 | retrieving revision 1.4 | ||
5 | diff -u -r1.4 local.c | ||
6 | --- native/jni/java-net/local.c 17 Apr 2007 21:46:27 -0000 1.4 | ||
7 | +++ native/jni/java-net/local.c 27 Jun 2008 13:14:40 -0000 | ||
8 | @@ -73,27 +73,18 @@ | ||
9 | return socket (PF_UNIX, stream ? SOCK_STREAM : SOCK_DGRAM, 0); | ||
10 | } | ||
11 | |||
12 | -static int gcc_sucks = 0; | ||
13 | - | ||
14 | int | ||
15 | local_bind (int fd, const char *addr) | ||
16 | { | ||
17 | struct sockaddr_un saddr; | ||
18 | |||
19 | - /* For some reason, GCC 4.0.1 on Darwin/x86 MODIFIES the `addr' | ||
20 | - pointer in the CALLER's STACK FRAME after calling this function, | ||
21 | - but if we add this statement below, it doesn't! */ | ||
22 | - if (gcc_sucks) | ||
23 | - fprintf (stderr, "bind %p\n", addr); | ||
24 | - | ||
25 | - if (strlen (addr) > sizeof (saddr.sun_path)) | ||
26 | + if (strlen (addr) >= sizeof (saddr.sun_path)) | ||
27 | { | ||
28 | errno = ENAMETOOLONG; | ||
29 | return -1; | ||
30 | } | ||
31 | |||
32 | - strncpy (saddr.sun_path, addr, sizeof (saddr.sun_path)); | ||
33 | - saddr.sun_path[sizeof (saddr.sun_path)] = '\0'; | ||
34 | + strcpy (saddr.sun_path, addr); | ||
35 | saddr.sun_family = AF_LOCAL; | ||
36 | |||
37 | return bind (fd, (struct sockaddr *) &saddr, SUN_LEN (&saddr)); | ||