View | Details | Raw Unified | Return to bug 47549
Collapse All | Expand All

(-)and/files/patch-and-OpenBSD.c (-3 / +3 lines)
Lines 4-16 Link Here
4
     abort();
4
     abort();
5
   }
5
   }
6
   if (openbsd_next >= openbsd_nproc) return NULL;
6
   if (openbsd_next >= openbsd_nproc) return NULL;
7
+#if defined(__FreeBSD__) && __FreeBSD_version >= 50014
7
+#if defined(__FreeBSD__) && __FreeBSD_version >= 500014
8
+  strncpy(openbsd_proc.command,openbsd_pt[openbsd_next].ki_comm,1023);
8
+  strncpy(openbsd_proc.command,openbsd_pt[openbsd_next].ki_comm,1023);
9
+#else
9
+#else
10
   strncpy(openbsd_proc.command,openbsd_pt[openbsd_next].kp_proc.p_comm,1023);
10
   strncpy(openbsd_proc.command,openbsd_pt[openbsd_next].kp_proc.p_comm,1023);
11
+#endif
11
+#endif
12
   openbsd_proc.command[1023] = 0;
12
   openbsd_proc.command[1023] = 0;
13
+#if defined(__FreeBSD__) && __FreeBSD_version >= 50014
13
+#if defined(__FreeBSD__) && __FreeBSD_version >= 500014
14
+  openbsd_proc.pid = openbsd_pt[openbsd_next].ki_pid;
14
+  openbsd_proc.pid = openbsd_pt[openbsd_next].ki_pid;
15
+  openbsd_proc.nice = openbsd_pt[openbsd_next].ki_nice-20;
15
+  openbsd_proc.nice = openbsd_pt[openbsd_next].ki_nice-20;
16
+  openbsd_proc.uid = openbsd_pt[openbsd_next].ki_ruid;
16
+  openbsd_proc.uid = openbsd_pt[openbsd_next].ki_ruid;
Lines 22-28 Link Here
22
   openbsd_proc.gid = openbsd_pt[openbsd_next].kp_eproc.e_pcred.p_rgid;
22
   openbsd_proc.gid = openbsd_pt[openbsd_next].kp_eproc.e_pcred.p_rgid;
23
+#endif
23
+#endif
24
   /* Adapted from top(1) port, as found in the misc@openbsd.org archive */
24
   /* Adapted from top(1) port, as found in the misc@openbsd.org archive */
25
+#if defined(__FreeBSD__) && __FreeBSD_version >= 50014
25
+#if defined(__FreeBSD__) && __FreeBSD_version >= 500014
26
+  /* XXX: Accessing ki_paddr causes sig10 ...
26
+  /* XXX: Accessing ki_paddr causes sig10 ...
27
+  openbsd_proc.utime = (openbsd_pt[openbsd_next].ki_paddr->p_uticks +
27
+  openbsd_proc.utime = (openbsd_pt[openbsd_next].ki_paddr->p_uticks +
28
+			openbsd_pt[openbsd_next].ki_paddr->p_sticks +
28
+			openbsd_pt[openbsd_next].ki_paddr->p_sticks +

Return to bug 47549