On 2022/12/16 12:19, Janne Johansson wrote:
> >
> > I have updated files for i386/amd64 and will soon have them for aarch64
> > if they're any use...
> >
> 
> "there is always that guy..."
> 
> Please make something similar for mips64 too while you are at it, I
> run the golang port "kopia" to back up my octeons.

You can regenerate the files by adding the patch below to lang/go,
running "make", then doing this:

cd `make show=WRKSRC`/syscall
doas env GOOS=openbsd GOARCH=mips64 CC=cc ./mkall.sh

and that will generate updated various *openbsd_mips64.go files.

But they won't actually be used until 1) they're updated upstream,
2) various software providing vendor copies or go.mod files with
pinned version numbers is updated to use the new version and 3)
various ports are updated to use those new files.


Index: patches/patch-src_syscall_mkerrors_sh
===================================================================
RCS file: patches/patch-src_syscall_mkerrors_sh
diff -N patches/patch-src_syscall_mkerrors_sh
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_syscall_mkerrors_sh       16 Dec 2022 11:54:56 -0000
@@ -0,0 +1,23 @@
+This script is broken by the API warnings output during compilation.
+
+Index: src/syscall/mkerrors.sh
+--- src/syscall/mkerrors.sh.orig
++++ src/syscall/mkerrors.sh
+@@ -426,7 +426,7 @@ main(void)
+               e = errors[i];
+               if(i > 0 && errors[i-1] == e)
+                       continue;
+-              strcpy(buf, strerror(e));
++              strncpy(buf, strerror(e), 1024);
+               // lowercase first letter: Bad -> bad, but STREAM -> STREAM.
+               if(A <= buf[0] && buf[0] <= Z && a <= buf[1] && buf[1] <= z)
+                       buf[0] += a - A;
+@@ -441,7 +441,7 @@ main(void)
+               e = signals[i];
+               if(i > 0 && signals[i-1] == e)
+                       continue;
+-              strcpy(buf, strsignal(e));
++              strncpy(buf, strsignal(e), 1024);
+               // lowercase first letter: Bad -> bad, but STREAM -> STREAM.
+               if(A <= buf[0] && buf[0] <= Z && a <= buf[1] && buf[1] <= z)
+                       buf[0] += a - A;

Reply via email to