Subject: [PATCH] Fix broken functionality on OpenBSD

From: Stepan Zolotuev <[email-masked]>
Date: Sun, 24 Nov 2024 10:08:06 +0000

Hi,

When porting goredo to OpenBSD I noticed that while the software
compiles without any issue, it does not run as expected. Specifically,
it consistenly errored out before doing any actual work with a "function
not implemented" error message. Happens with latest release (2.6.2) and
latest git master.

It is a known issue with software that uses old versions of
'golang.org/x/sys' module. It seems like at some point OpenBSD devs
changed some macro values in libc and it irreversibly broke old versions
of the aforementioned module that expected different macro values.

The only fix I know of is to update the module in question. Diff against
git master below.

By the way, could a maintenance release be made (based on 2.6.2) with
this fix? This would allow me to drop patches from the OpenBSD port.
Even if not, thanks for your attention.

-- 
for private communication:
<https://kefir.tilde.institute/files/pgp.asc>

diff --git go.mod go.mod
index 6b45a20..c901785 100644
--- go.mod
+++ go.mod
@@ -8,7 +8,7 @@ require (
 	github.com/google/uuid v1.3.1
 	go.cypherpunks.su/recfile/v2 v2.0.0
 	go.cypherpunks.su/tai64n/v3 v3.0.0
-	golang.org/x/sys v0.11.0
+	golang.org/x/sys v0.27.0
 	golang.org/x/term v0.11.0
 	lukechampine.com/blake3 v1.2.1
 )
diff --git go.sum go.sum
index e7ae41a..6ac8f8f 100644
--- go.sum
+++ go.sum
@@ -7,8 +7,8 @@ go.cypherpunks.su/recfile/v2 v2.0.0/go.mod h1:36EnyBwx6VpsSM5MMcYGTDiKrVEP49S09p
 go.cypherpunks.su/tai64n/v3 v3.0.0 h1:JvQiZJwkswUttMNcPrYS4KUK9Zfl6xllD0N6ZnSZX/U=
 go.cypherpunks.su/tai64n/v3 v3.0.0/go.mod h1:zGDFuyiFKJk+iem8lyBaFeCm+MNMOn7RRWy456n1J78=
 golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM=
-golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.27.0 h1:wBqf8DvsY9Y/2P8gAfPDEYNuS30J4lPHJxXSb/nJZ+s=
+golang.org/x/sys v0.27.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
 golang.org/x/term v0.11.0 h1:F9tnn/DA/Im8nCwm+fX+1/eBwi4qFjRT++MhtVC4ZX0=
 golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU=
 lukechampine.com/blake3 v1.2.1 h1:YuqqRuaqsGV71BV/nm9xlI0MKUv4QC54jQnBChWbGnI=