--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/components/top/patches/03.sunos5.patch Sun Jul 03 23:10:05 2011 -0700
@@ -0,0 +1,17 @@
+--- top-3.8beta1/machine/m_sunos5.c.orig Fri Jun 17 05:40:25 2011
++++ top-3.8beta1/machine/m_sunos5.c Fri Jun 17 05:48:17 2011
+@@ -2064,7 +2064,13 @@
+
+ /* read the whole file */
+ p = malloc(st.st_size);
+- (void)pread(fd, p, st.st_size, 0);
++ if (pread(fd, p, st.st_size, 0) == -1)
++ {
++ (void) close(fd);
++ op->fd_psinfo = -1;
++ free(p);
++ continue;
++ }
+
+ /* cache the file descriptor if we can */
+ if (fd < maxfiles)