ref: d75c01ac6bb53fc48551d716458abf428c2687c6
parent: f35fcff7b5fef0b95079c09445b5e60659dc271e
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Sat Aug 25 02:37:01 EDT 2018
[lib/c] Fix NetBSD syscalls numbers These numbers were copied from Linux and obviously they were expected to be wrong.
--- /dev/null
+++ b/lib/c/target/amd64-sysv-netbsd/.gitignore
@@ -1,0 +1,9 @@
+_Exit.s
+_brk.s
+_close.s
+_getpid.s
+_kill.s
+_lseek.s
+_open.s
+_read.s
+_write.s
--- a/lib/c/target/amd64-sysv-netbsd/Makefile
+++ b/lib/c/target/amd64-sysv-netbsd/Makefile
@@ -5,7 +5,7 @@
SYSNAME = amd64-sysv-netbsd
SCC_CFLAGS = -nostdinc -I$(INCDIR) -I$(INCDIR)/bits/amd64-sysv/
-SYSOBJ = raise.o
+SYSOBJ = raise.o signal.o
include syscall.mk
include ../script/objlst.mk
@@ -12,3 +12,4 @@
include ../script/common.mk
raise.o: ../posix/raise.c ../../syscall.h
+signal.o: ../posix/signal.c ../../syscall.h
--- a/lib/c/target/amd64-sysv-netbsd/syscall.lst
+++ b/lib/c/target/amd64-sysv-netbsd/syscall.lst
@@ -1,13 +1,10 @@
#number name
-0 _read
-1 _write
-2 _open
-3 _close
-3 _lseek
-12 _brk
-13 _rt_sigaction
-38 _getpid
-60 _Exit
-32 _kill
-39 _getpid
-62 _kill
+1 _Exit
+3 _read
+4 _write
+5 _open
+6 _close
+17 _brk
+20 _getpid
+37 _kill
+199 _lseek
--- a/lib/c/target/amd64-sysv-netbsd/syscall.mk
+++ b/lib/c/target/amd64-sysv-netbsd/syscall.mk
@@ -1,1 +1,1 @@
-SYSCALL = _read.o _write.o _open.o _close.o _lseek.o _brk.o _rt_sigaction.o _getpid.o _Exit.o _kill.o _getpid.o _kill.o
+SYSCALL = _Exit.o _read.o _write.o _open.o _close.o _brk.o _getpid.o _kill.o _lseek.o