summaryrefslogtreecommitdiffstats
path: root/recipes-core/openjdk/openjdk-6-6b24/icedtea-hotspot-loadavg.patch
diff options
context:
space:
mode:
authorHenning Heinold <heinold@inf.fu-berlin.de>2011-12-21 18:04:50 +0100
committerHenning Heinold <heinold@inf.fu-berlin.de>2011-12-22 23:27:18 +0100
commitdc556eb28261bb511ffece377734be095d02658c (patch)
treea65336fa2ab8f4c4c56bcd25d40d4858d64b741f /recipes-core/openjdk/openjdk-6-6b24/icedtea-hotspot-loadavg.patch
parent5fd90b0bdc98e403fdb99c89ff6a51bc69c39c51 (diff)
downloadmeta-java-dc556eb28261bb511ffece377734be095d02658c.tar.gz
openjdk6: add icedtea pre 1.11 version from mercurial
* add jamvm target * simplify versionhandling of jaxp and other external stuff * switch back to llvm 2.8 for shark, because it is the last version known to work, * llvm works partly * rework postinst and prerm and use zero as default vm * bump INC_PR Signed-off-by: Henning Heinold <heinold@inf.fu-berlin.de>
Diffstat (limited to 'recipes-core/openjdk/openjdk-6-6b24/icedtea-hotspot-loadavg.patch')
-rw-r--r--recipes-core/openjdk/openjdk-6-6b24/icedtea-hotspot-loadavg.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/recipes-core/openjdk/openjdk-6-6b24/icedtea-hotspot-loadavg.patch b/recipes-core/openjdk/openjdk-6-6b24/icedtea-hotspot-loadavg.patch
new file mode 100644
index 0000000..7da41fd
--- /dev/null
+++ b/recipes-core/openjdk/openjdk-6-6b24/icedtea-hotspot-loadavg.patch
@@ -0,0 +1,28 @@
1Index: icedtea6-1.8/build/openjdk/hotspot/src/os/linux/vm/os_linux.cpp
2===================================================================
3--- openjdk/hotspot/src/os/linux/vm/os_linux.cpp 2010-06-09 22:16:09.406334411 +0200
4+++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp 2010-06-09 22:19:38.952152043 +0200
5@@ -4325,7 +4325,22 @@
6 // Linux doesn't yet have a (official) notion of processor sets,
7 // so just return the system wide load average.
8 int os::loadavg(double loadavg[], int nelem) {
9- return ::getloadavg(loadavg, nelem);
10+
11+ FILE *LOADAVG;
12+ double avg[3] = { 0.0, 0.0, 0.0 };
13+ int i, res = -1;;
14+
15+ if ((LOADAVG = fopen("/proc/loadavg", "r"))) {
16+ fscanf(LOADAVG, "%lf %lf %lf", &avg[0], &avg[1], &avg[2]);
17+ res = 0;
18+ fclose(LOADAVG);
19+ }
20+
21+ for (i = 0; (i < nelem) && (i < 3); i++) {
22+ loadavg[i] = avg[i];
23+ }
24+
25+ return res;
26 }
27
28 void os::pause() {