Package: freebsd-libs / 10.3~svn296373-10

04_libkvm.diff Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
--- a/lib/libkvm/kvm_vnet.c
+++ b/lib/libkvm/kvm_vnet.c
@@ -68,18 +68,18 @@
 		 * here to __{start,stop}_set_vnet.
 		 */
 #define	NLIST_START_VNET	0
-		{ .n_name = "___start_" VNET_SETNAME },
+		{ "___start_" VNET_SETNAME },
 #define	NLIST_STOP_VNET		1
-		{ .n_name = "___stop_" VNET_SETNAME },
+		{ "___stop_" VNET_SETNAME },
 #define	NLIST_VNET_HEAD		2
-		{ .n_name = "vnet_head" },
+		{ "vnet_head" },
 #define	NLIST_ALLPROC		3
-		{ .n_name = "allproc" },
+		{ "allproc" },
 #define	NLIST_DUMPTID		4
-		{ .n_name = "dumptid" },
+		{ "dumptid" },
 #define	NLIST_PROC0		5
-		{ .n_name = "proc0" },
-		{ .n_name = NULL },
+		{ "proc0" },
+		{ NULL },
 	};
 	uintptr_t procp, credp;
 #define	VMCORE_VNET_OF_PROC0
--- a/lib/libkvm/kvm_proc.c
+++ b/lib/libkvm/kvm_proc.c
@@ -387,6 +387,12 @@
 		kp->ki_runtime = cputick2usec(proc.p_rux.rux_runtime);
 		kp->ki_pid = proc.p_pid;
 		kp->ki_siglist = proc.p_siglist;
+#define SIGSETOR(set1, set2)                                            \
+        do {                                                            \
+                int __i;                                                \
+                for (__i = 0; __i < _SIG_WORDS; __i++)                  \
+                        (set1).__bits[__i] |= (set2).__bits[__i];       \
+        } while (0)
 		SIGSETOR(kp->ki_siglist, mtd.td_siglist);
 		kp->ki_sigmask = mtd.td_sigmask;
 		kp->ki_xstat = proc.p_xstat;
--- a/lib/libkvm/kvm.h
+++ b/lib/libkvm/kvm.h
@@ -35,6 +35,7 @@
 
 #include <sys/cdefs.h>
 #include <sys/types.h>
+#include <stdint.h>		/* uint64_t */
 #include <nlist.h>
 
 /* Default version symbol. */