Fri Jun 23 22:13:22 2017 UTC ()
Correct tct build on NetBSD 8.99.1

Address <sys/user.h> removal fallout.


(kamil)
diff -r1.9 -r1.10 pkgsrc/security/tct/distinfo
diff -r1.3 -r1.4 pkgsrc/security/tct/patches/patch-am

cvs diff -r1.9 -r1.10 pkgsrc/security/tct/distinfo (expand / switch to unified diff)

--- pkgsrc/security/tct/distinfo 2015/11/04 01:18:12 1.9
+++ pkgsrc/security/tct/distinfo 2017/06/23 22:13:22 1.10
@@ -1,22 +1,22 @@ @@ -1,22 +1,22 @@
1$NetBSD: distinfo,v 1.9 2015/11/04 01:18:12 agc Exp $ 1$NetBSD: distinfo,v 1.10 2017/06/23 22:13:22 kamil Exp $
2 2
3SHA1 (tct-1.09.tar.gz) = fffb6ae1f389cfdfad95a9a81f6eaba115c9dfc0 3SHA1 (tct-1.09.tar.gz) = fffb6ae1f389cfdfad95a9a81f6eaba115c9dfc0
4RMD160 (tct-1.09.tar.gz) = ee4ddc286a2564f9b1daaa41f35e3d0fe8d6ea71 4RMD160 (tct-1.09.tar.gz) = ee4ddc286a2564f9b1daaa41f35e3d0fe8d6ea71
5SHA512 (tct-1.09.tar.gz) = d37278f869adee853633dc555980188692b3bcd91c60851f19fe9b541846e5aa912436fb8951d826380861a9e1fe240248cd41a4820a1899725a7328ae38ed2c 5SHA512 (tct-1.09.tar.gz) = d37278f869adee853633dc555980188692b3bcd91c60851f19fe9b541846e5aa912436fb8951d826380861a9e1fe240248cd41a4820a1899725a7328ae38ed2c
6Size (tct-1.09.tar.gz) = 314134 bytes 6Size (tct-1.09.tar.gz) = 314134 bytes
7SHA1 (patch-aa) = a35aa034a081ff37ce56192f1f25d2cd2f15d46a 7SHA1 (patch-aa) = a35aa034a081ff37ce56192f1f25d2cd2f15d46a
8SHA1 (patch-ab) = c58443c20afd70e00f61e76fc3f2a453b5508f7f 8SHA1 (patch-ab) = c58443c20afd70e00f61e76fc3f2a453b5508f7f
9SHA1 (patch-ac) = db01162b2394a086c6e878dc5587320448ccbe45 9SHA1 (patch-ac) = db01162b2394a086c6e878dc5587320448ccbe45
10SHA1 (patch-ad) = 12bad749062032c88b9ddcbb5c30aed0f4409e3b 10SHA1 (patch-ad) = 12bad749062032c88b9ddcbb5c30aed0f4409e3b
11SHA1 (patch-ae) = bfecf9be7cdcc078f8c9ff5bd2141e43f46ede90 11SHA1 (patch-ae) = bfecf9be7cdcc078f8c9ff5bd2141e43f46ede90
12SHA1 (patch-af) = d5629a143ee190b64df298f22dfd2e8ba8928d52 12SHA1 (patch-af) = d5629a143ee190b64df298f22dfd2e8ba8928d52
13SHA1 (patch-ag) = 4f03bdc2ae7f1bf36a705a3543f9925fcc037c11 13SHA1 (patch-ag) = 4f03bdc2ae7f1bf36a705a3543f9925fcc037c11
14SHA1 (patch-ah) = dedb464b3050b5c7dafe620d75743ef9525e7696 14SHA1 (patch-ah) = dedb464b3050b5c7dafe620d75743ef9525e7696
15SHA1 (patch-ai) = a706e9265552d4864b765c7700ee80cd61a19edf 15SHA1 (patch-ai) = a706e9265552d4864b765c7700ee80cd61a19edf
16SHA1 (patch-aj) = 736eb7f1cb1c1a3eb7f7ce69019e8f4a61753b40 16SHA1 (patch-aj) = 736eb7f1cb1c1a3eb7f7ce69019e8f4a61753b40
17SHA1 (patch-ak) = 03cb4b36878386c3200b37a0f9092f80f6813bcd 17SHA1 (patch-ak) = 03cb4b36878386c3200b37a0f9092f80f6813bcd
18SHA1 (patch-al) = e29ba1b2846f63c2847072f6e0c37b58a94a76e9 18SHA1 (patch-al) = e29ba1b2846f63c2847072f6e0c37b58a94a76e9
19SHA1 (patch-am) = 57531cca621df787c4aa59e4a2ddd2d538f3933a 19SHA1 (patch-am) = 3c84ffe20ea0d180801b3286ded407a2045c6b48
20SHA1 (patch-an) = 27c7d503841bcb58ae141f594decc8aff3b72e7d 20SHA1 (patch-an) = 27c7d503841bcb58ae141f594decc8aff3b72e7d
21SHA1 (patch-ao) = ba87c403613154a091cdbe91c8fa43335d2bfe50 21SHA1 (patch-ao) = ba87c403613154a091cdbe91c8fa43335d2bfe50
22SHA1 (patch-ap) = 1587d7b4e4da1226a2943a4f98b9fa20bd83c79d 22SHA1 (patch-ap) = 1587d7b4e4da1226a2943a4f98b9fa20bd83c79d

cvs diff -r1.3 -r1.4 pkgsrc/security/tct/patches/patch-am (expand / switch to unified diff)

--- pkgsrc/security/tct/patches/patch-am 2015/03/19 08:34:53 1.3
+++ pkgsrc/security/tct/patches/patch-am 2017/06/23 22:13:22 1.4
@@ -1,68 +1,67 @@ @@ -1,68 +1,67 @@
1$NetBSD: patch-am,v 1.3 2015/03/19 08:34:53 dholland Exp $ 1$NetBSD: patch-am,v 1.4 2017/06/23 22:13:22 kamil Exp $
2 2
3 - Use standard headers. 3 - Use standard headers.
4 - Support NetBSD. 4 - Support NetBSD.
5 - LP64 fix. 5 - LP64 fix.
6 6
7--- src/pcat/pcat.c.orig 2001-09-25 17:22:20.000000000 +0000 7--- src/pcat/pcat.c.orig 2001-09-25 17:22:20.000000000 +0000
8+++ src/pcat/pcat.c 8+++ src/pcat/pcat.c
9@@ -75,6 +75,7 @@ 9@@ -75,6 +75,7 @@
10  10
11 #include <stdio.h> 11 #include <stdio.h>
12 #include <stdlib.h> 12 #include <stdlib.h>
13+#include <string.h> 13+#include <string.h>
14 #include <unistd.h> 14 #include <unistd.h>
15 #include <fcntl.h> 15 #include <fcntl.h>
16 #include <signal.h> 16 #include <signal.h>
17@@ -177,6 +178,24 @@ 17@@ -177,6 +178,23 @@
18 #endif 18 #endif
19  19
20 /* 20 /*
21+ * Based on the OpenBSD code above. 21+ * Based on the OpenBSD code above.
22+ */ 22+ */
23+#if defined(NETBSD1) || defined(NETBSD2) 23+#if defined(NETBSD1) || defined(NETBSD2)
24+#define SUPPORTED 24+#define SUPPORTED
25+#include <sys/param.h> 25+#include <sys/param.h>
26+#include <sys/user.h> 
27+#include <sys/sysctl.h> 26+#include <sys/sysctl.h>
28+#include <kvm.h> 27+#include <kvm.h>
29+#include <stddef.h> 28+#include <stddef.h>
30+#define HAVE_PTRACE_MEM 29+#define HAVE_PTRACE_MEM
31+#define PTRACE_ATTACH PT_ATTACH 30+#define PTRACE_ATTACH PT_ATTACH
32+#define PTRACE_DETACH PT_DETACH 31+#define PTRACE_DETACH PT_DETACH
33+#define PTRACE_PEEKDATA PT_READ_D 32+#define PTRACE_PEEKDATA PT_READ_D
34+#define HAVE_BROKEN_CTOB 33+#define HAVE_BROKEN_CTOB
35+#define PTRACE_ARG3_T caddr_t 34+#define PTRACE_ARG3_T caddr_t
36+#endif 35+#endif
37+ 36+
38+ /* 37+ /*
39 * SunOS 4.x has no /proc, and ptrace() peeking the u area won't give us the 38 * SunOS 4.x has no /proc, and ptrace() peeking the u area won't give us the
40 * process memory segment sizes. Instead we must grope process information 39 * process memory segment sizes. Instead we must grope process information
41 * from kernel virtual memory. This requires super-user privilege. 40 * from kernel virtual memory. This requires super-user privilege.
42@@ -414,7 +433,7 @@ static int ptrace_attach_wait(pid_t pid) 41@@ -414,7 +432,7 @@ static int ptrace_attach_wait(pid_t pid)
43  42
44 /* call_ptrace - ptrace() with error handling */ 43 /* call_ptrace - ptrace() with error handling */
45  44
46-static int call_ptrace(int request, pid_t pid, int addr, int data) 45-static int call_ptrace(int request, pid_t pid, int addr, int data)
47+static int call_ptrace(int request, pid_t pid, uintptr_t addr, int data) 46+static int call_ptrace(int request, pid_t pid, uintptr_t addr, int data)
48 { 47 {
49 int result; 48 int result;
50  49
51@@ -456,7 +475,7 @@ static void read_proc(PROC_INFO *proc, c 50@@ -456,7 +474,7 @@ static void read_proc(PROC_INFO *proc, c
52 "; did you use GCC with another machine's header files?" : ""); 51 "; did you use GCC with another machine's header files?" : "");
53 #else 52 #else
54 int words[READ_BUFSIZ_WORDS]; 53 int words[READ_BUFSIZ_WORDS];
55- int addr; 54- int addr;
56+ uintptr_t addr; 55+ uintptr_t addr;
57 int n; 56 int n;
58  57
59 /* 58 /*
60@@ -469,7 +488,7 @@ static void read_proc(PROC_INFO *proc, c 59@@ -469,7 +487,7 @@ static void read_proc(PROC_INFO *proc, c
61 panic("read_proc: request size %d is not word-aligned", len); 60 panic("read_proc: request size %d is not word-aligned", len);
62 if (verbose) 61 if (verbose)
63 fprintf(stderr, "read seek to 0x%lx\n", (long) offset); 62 fprintf(stderr, "read seek to 0x%lx\n", (long) offset);
64- for (n = 0, addr = (int) offset; n < len / sizeof(int); addr += sizeof(int), n++) 63- for (n = 0, addr = (int) offset; n < len / sizeof(int); addr += sizeof(int), n++)
65+ for (n = 0, addr = (uintptr_t) offset; n < len / sizeof(int); addr += sizeof(int), n++) 64+ for (n = 0, addr = (uintptr_t) offset; n < len / sizeof(int); addr += sizeof(int), n++)
66 words[n] = call_ptrace(PTRACE_PEEKDATA, proc->pid, addr, 0); 65 words[n] = call_ptrace(PTRACE_PEEKDATA, proc->pid, addr, 0);
67 memcpy(data, (char *) words, len); 66 memcpy(data, (char *) words, len);
68 #endif 67 #endif