summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2012-05-09 11:14:22 +0000
committerFabian Groffen <grobian@gentoo.org>2012-05-09 11:14:22 +0000
commit221b68f36cb506df301c2af8e72a9b8ea36c586e (patch)
tree1a567b5f23d2717c3bba16fa9c1db6a91f804b9f /sys-process/unixtop/files
parentMake comply with multilib-strict (diff)
downloadgentoo-2-221b68f36cb506df301c2af8e72a9b8ea36c586e.tar.gz
gentoo-2-221b68f36cb506df301c2af8e72a9b8ea36c586e.tar.bz2
gentoo-2-221b68f36cb506df301c2af8e72a9b8ea36c586e.zip
Revbump for some patches from Oracle/OpenIndiana
(Portage version: 2.2.01.20430-prefix/cvs/SunOS i386)
Diffstat (limited to 'sys-process/unixtop/files')
-rw-r--r--sys-process/unixtop/files/unixtop-3.8_beta1-memleak-fix-v2.patch44
-rw-r--r--sys-process/unixtop/files/unixtop-3.8_beta1-percent-cpu.patch23
2 files changed, 67 insertions, 0 deletions
diff --git a/sys-process/unixtop/files/unixtop-3.8_beta1-memleak-fix-v2.patch b/sys-process/unixtop/files/unixtop-3.8_beta1-memleak-fix-v2.patch
new file mode 100644
index 000000000000..76042bb4c1a6
--- /dev/null
+++ b/sys-process/unixtop/files/unixtop-3.8_beta1-memleak-fix-v2.patch
@@ -0,0 +1,44 @@
+https://hg.openindiana.org/upstream/oracle/userland-gate/raw-file/23c55a2f8a8e/components/top/patches/03.sunos5.patch
+
+*** top-3.8beta1/machine/m_sunos5.c.orig Wed Aug 31 05:23:52 2011
+--- top-3.8beta1/machine/m_sunos5.c Wed Aug 31 05:25:25 2011
+***************
+*** 2064,2070 ****
+
+ /* read the whole file */
+ p = malloc(st.st_size);
+! (void)pread(fd, p, st.st_size, 0);
+
+ /* cache the file descriptor if we can */
+ if (fd < maxfiles)
+--- 2064,2076 ----
+
+ /* read the whole file */
+ p = malloc(st.st_size);
+! if (pread(fd, p, st.st_size, 0) != st.st_size)
+! {
+! (void) close(fd);
+! op->fd_lpsinfo = -1;
+! free(p);
+! continue;
+! }
+
+ /* cache the file descriptor if we can */
+ if (fd < maxfiles)
+***************
+*** 2148,2154 ****
+ op->oldtime = TIMESPEC_TO_DOUBLE(lwpp->pr_time);
+ op->seen = 1;
+ }
+! free(p);
+ }
+ #endif
+
+--- 2154,2160 ----
+ op->oldtime = TIMESPEC_TO_DOUBLE(lwpp->pr_time);
+ op->seen = 1;
+ }
+! free(prp);
+ }
+ #endif
+
diff --git a/sys-process/unixtop/files/unixtop-3.8_beta1-percent-cpu.patch b/sys-process/unixtop/files/unixtop-3.8_beta1-percent-cpu.patch
new file mode 100644
index 000000000000..503ed3576a70
--- /dev/null
+++ b/sys-process/unixtop/files/unixtop-3.8_beta1-percent-cpu.patch
@@ -0,0 +1,23 @@
+https://hg.openindiana.org/upstream/oracle/userland-gate/file/23c55a2f8a8e/components/top/patches/04.percent_cpu.patch
+
+--- top-3.8beta1/machine/m_sunos5.c.orig Tue Nov 8 11:23:08 2011
++++ top-3.8beta1/machine/m_sunos5.c Tue Nov 8 11:23:11 2011
+@@ -152,8 +152,17 @@
+ * one of the spare slots in the prinfo structure.
+ */
+
+-#define percent_cpu(pp) (*(double *)dbl_align(&pp->pr_filler[0]))
++#if OSREV > 59
++/*
++ * on Solaris 10, psinfo.pr_filler is 4 bytes and not double-aligned, so we must * move our scratch space to the larger pr.lwp_pr_filler which is 20 bytes
++ * XXX this is a time bomb and will likely break in future Solaris releases.
++ */
++#define percent_cpu(pp) (*(double *)dbl_align(&pp->pr_lwp.pr_filler[0]))
++#else
++#define percent_cpu(pp) (*(double *)dbl_align(&pp->pr_filler[0]))
++#endif
+
++
+ /* definitions for indices in the nlist array */
+ #define X_V 0
+ #define X_MPID 1