Taken from the posix-riscv64 subdirectory in the community/drawterm source. diff -uNr 9base-6-orig/lib9/getcallerpc-riscv64.c 9base-6/lib9/getcallerpc-riscv64.c --- 9base-6-orig/lib9/getcallerpc-riscv64.c 1970-01-01 01:00:00.000000000 +0100 +++ 9base-6/lib9/getcallerpc-riscv64.c 2021-07-04 16:39:04.452113924 +0200 @@ -0,0 +1,7 @@ +#include + +ulong +getcallerpc(void *x) +{ + return ((uintptr*)x)[-1]; +}