Subject: [Patch] Fix build breakage due to PTRACE in compat/sunos32
To: None <port-sparc64@netbsd.org>
From: David P. Reese, Jr. <daver@solidcore.com>
List: port-sparc64
Date: 08/31/2006 00:33:18
--Apple-Mail-2-461256251
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=US-ASCII;
	format=flowed

Anyone care to commit?


--Apple-Mail-2-461256251
Content-Transfer-Encoding: 7bit
Content-Type: application/octet-stream;
	x-unix-mode=0664;
	name="compat-sunos32-ptrace.diff"
Content-Disposition: attachment;
	filename=compat-sunos32-ptrace.diff

Index: sys/compat/sunos32/sunos32_misc.c
===================================================================
RCS file: /cvsroot/src/sys/compat/sunos32/sunos32_misc.c,v
retrieving revision 1.39
diff -u -r1.39 sunos32_misc.c
--- sys/compat/sunos32/sunos32_misc.c	23 Jul 2006 22:06:09 -0000	1.39
+++ sys/compat/sunos32/sunos32_misc.c	31 Aug 2006 07:31:00 -0000
@@ -1488,6 +1488,7 @@
 };
 static const int nreqs = sizeof(sreq2breq) / sizeof(sreq2breq[0]);
 
+#if defined(PTRACE)
 int
 sunos32_sys_ptrace(l, v, retval)
 	struct lwp *l;
@@ -1520,6 +1521,7 @@
 
 	return netbsd32_ptrace(l, &pa, retval);
 }
+#endif /* PTRACE */
 
 /*
  * SunOS reboot system call (for compatibility).
Index: sys/compat/sunos32/syscalls.master
===================================================================
RCS file: /cvsroot/src/sys/compat/sunos32/syscalls.master,v
retrieving revision 1.13
diff -u -r1.13 syscalls.master
--- sys/compat/sunos32/syscalls.master	13 Jul 2006 23:38:57 -0000	1.13
+++ sys/compat/sunos32/syscalls.master	31 Aug 2006 07:31:01 -0000
@@ -87,8 +87,12 @@
 23	NOARGS		{ int netbsd32_setuid(uid_t uid); }
 24	NOARGS		{ uid_t sys_getuid_with_euid(void); }
 25	STD		{ int sunos32_sys_stime(sunos32_time_tp tp); }
+#if defined(PTRACE) || !defined(_KERNEL)
 26	STD		{ netbsd32_long sunos32_sys_ptrace(int req, pid_t pid, \
 			    netbsd32_caddr_t addr, int data, netbsd32_charp addr2); }
+#else
+26	EXCL		ptrace
+#endif
 27	UNIMPL		old_sunos_alarm
 28	UNIMPL		old_sunos_fstat
 29	UNIMPL		old_sunos_pause

--Apple-Mail-2-461256251
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=US-ASCII;
	format=flowed



--
David P. Reese, Jr.
daver@siginfo.org
--Apple-Mail-2-461256251--