summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2012-05-03 13:22:41 +0000
committerFabian Groffen <grobian@gentoo.org>2012-05-03 13:22:41 +0000
commit03cb3b60e0531065fa4f2b96f2a509f004bb620d (patch)
tree7db39c3a4ebfff3d0ea4eee46d8a9cbdcd4e2155 /sys-process/top-apple/files
parentMigrate to virtual/pkgconfig. (diff)
downloadgentoo-2-03cb3b60e0531065fa4f2b96f2a509f004bb620d.tar.gz
gentoo-2-03cb3b60e0531065fa4f2b96f2a509f004bb620d.tar.bz2
gentoo-2-03cb3b60e0531065fa4f2b96f2a509f004bb620d.zip
Initial ebuild of Apple's version of top from Mac OS X Lion, patched to compile on older versions as well.
(Portage version: 2.2.01.20366-prefix/cvs/SunOS i386)
Diffstat (limited to 'sys-process/top-apple/files')
-rw-r--r--sys-process/top-apple/files/top-apple-73-darwin9.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/sys-process/top-apple/files/top-apple-73-darwin9.patch b/sys-process/top-apple/files/top-apple-73-darwin9.patch
new file mode 100644
index 000000000000..63d37c58f30b
--- /dev/null
+++ b/sys-process/top-apple/files/top-apple-73-darwin9.patch
@@ -0,0 +1,40 @@
+--- libtop.c.orig 2012-05-03 14:35:48.000000000 +0200
++++ libtop.c 2012-05-03 14:41:36.000000000 +0200
+@@ -23,6 +23,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <limits.h>
++#include <inttypes.h>
+ #include <sys/types.h>
+ #include <mach/bootstrap.h>
+ #include <mach/host_priv.h>
+@@ -1458,6 +1459,7 @@
+ libtop_pinfo_update_kernmem_info(task_t task, libtop_pinfo_t* pinfo) {
+ kern_return_t kr;
+
++#ifdef TASK_KERNELMEMORY_INFO_COUNT
+ mach_msg_type_number_t count = TASK_KERNELMEMORY_INFO_COUNT;
+
+ pinfo->psamp.p_palloc = pinfo->psamp.palloc;
+@@ -1466,6 +1468,9 @@
+ pinfo->psamp.p_sfree = pinfo->psamp.sfree;
+
+ kr = task_info(task, TASK_KERNELMEMORY_INFO, (task_info_t)&pinfo->psamp.palloc, &count);
++#else
++ memset(&pinfo->psamp.palloc, 0, sizeof(pinfo->psamp.palloc));
++#endif
+ return kr;
+ }
+
+@@ -1630,9 +1635,11 @@
+ }
+
+ switch (info.share_mode) {
++#ifdef SM_LARGE_PAGE
+ case SM_LARGE_PAGE:
+ // Treat SM_LARGE_PAGE the same as SM_PRIVATE
+ // since they are not shareable and are wired.
++#endif
+ case SM_PRIVATE:
+ rprvt += info.private_pages_resident * pagesize;
+ rprvt += info.shared_pages_resident * pagesize;