shithub: mc

Download patch

ref: 180c0d000870433ae0108bb0bac1e9cdac5ce92c
parent: d052b8be7485d34e4349c80b43cda34f574e7cd8
author: Carlin Bingham <cb@viennan.net>
date: Sat Jul 8 08:59:34 EDT 2017

Use the correct syscall for kill on OpenBSD

--- a/lib/sys/sys+openbsd-x64.myr
+++ b/lib/sys/sys+openbsd-x64.myr
@@ -379,7 +379,6 @@
 	const Syschflags : scno = 34
 	const Sysfchflags : scno = 35
 	const Syssync : scno = 36
-	const Syskill : scno = 37
 	const Sysstat : scno = 38
 	const Sysgetppid : scno = 39
 	const Syslstat : scno = 40
@@ -457,6 +456,7 @@
 	const Sysgetsockopt : scno = 118
 	const Sysreadv : scno = 120
 	const Syswritev : scno = 121
+	const Syskill : scno = 122
 	const Sysfchown : scno = 123
 	const Sysfchmod : scno = 124
 	const Syssetreuid : scno = 126
--- a/rt/abort-openbsd.s
+++ b/rt/abort-openbsd.s
@@ -27,7 +27,7 @@
 	movq	$20,%rax 	/* getpid */
 	syscall	
 	movq	%rax, %rdi	/* save pid */
-	movq	$37, %rax	/* kill(pid=%rdi, sig=%rsi) */
+	movq	$122, %rax	/* kill(pid=%rdi, sig=%rsi) */
 	movq	$6, %rsi
 	syscall
 .data