rust/cargo-c: update to 0.10.9+cargo-0.85.0
[oi-userland.git] / components / sysutils / top / patches / 03.sunos5.patch
blob11d4271798a6aa27de8692443da0a527fd1c3a9d
1 *** top-3.8beta1/machine/m_sunos5.c.orig Wed Aug 31 05:23:52 2011
2 --- top-3.8beta1/machine/m_sunos5.c Wed Aug 31 05:25:25 2011
3 ***************
4 *** 2064,2070 ****
6 /* read the whole file */
7 p = malloc(st.st_size);
8 ! (void)pread(fd, p, st.st_size, 0);
10 /* cache the file descriptor if we can */
11 if (fd < maxfiles)
12 --- 2064,2076 ----
14 /* read the whole file */
15 p = malloc(st.st_size);
16 ! if (pread(fd, p, st.st_size, 0) != st.st_size)
17 ! {
18 ! (void) close(fd);
19 ! op->fd_lpsinfo = -1;
20 ! free(p);
21 ! continue;
22 ! }
24 /* cache the file descriptor if we can */
25 if (fd < maxfiles)
26 ***************
27 *** 2148,2154 ****
28 op->oldtime = TIMESPEC_TO_DOUBLE(lwpp->pr_time);
29 op->seen = 1;
31 ! free(p);
33 #endif
35 --- 2154,2160 ----
36 op->oldtime = TIMESPEC_TO_DOUBLE(lwpp->pr_time);
37 op->seen = 1;
39 ! free(prp);
41 #endif