3 Commits
Author SHA1 Message Date
RandyTheSilly 93a64518fe Update README.md 2025-08-17 12:46:53 -04:00
RandyTheSilly f340b74c01 Add patch for PID support in FreeBSD 13+ xucred 2025-08-17 12:32:37 -04:00
Gopher Robot 543f21a056 all: upgrade go directive to at least 1.24.0 [generated]
By now Go 1.25.0 has been released, and Go 1.23 is no longer supported
per the Go Release Policy (see https://go.dev/doc/devel/release#policy).

For golang/go#69095.

[git-generate]
(cd . && go get go@1.24.0 && go mod tidy && go fix ./... && go mod edit -toolchain=none)

Change-Id: I0a3cdf3452806d955a3c293c9bdd59e4c1f56f8a
Reviewed-on: https://go-review.googlesource.com/c/sys/+/695616
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Gopher Robot <gobot@golang.org>
2025-08-13 07:47:20 -07:00
8 changed files with 131 additions and 31 deletions
+115
View File
@@ -0,0 +1,115 @@
diff --git a/unix/ztypes_freebsd_386.go b/unix/ztypes_freebsd_386.go
index 51e13eb0..5212328e 100644
--- a/unix/ztypes_freebsd_386.go
+++ b/unix/ztypes_freebsd_386.go
@@ -203,7 +203,8 @@ type Xucred struct {
Uid uint32
Ngroups int16
Groups [16]uint32
- _ *byte
+ _ byte
+ Pid uint32
}
type Linger struct {
@@ -268,7 +269,7 @@ const (
SizeofSockaddrAny = 0x6c
SizeofSockaddrUnix = 0x6a
SizeofSockaddrDatalink = 0x36
- SizeofXucred = 0x50
+ SizeofXucred = 0x54
SizeofLinger = 0x8
SizeofIovec = 0x8
SizeofIPMreq = 0x8
diff --git a/unix/ztypes_freebsd_amd64.go b/unix/ztypes_freebsd_amd64.go
index d002d8ef..1673b4e8 100644
--- a/unix/ztypes_freebsd_amd64.go
+++ b/unix/ztypes_freebsd_amd64.go
@@ -200,7 +200,8 @@ type Xucred struct {
Uid uint32
Ngroups int16
Groups [16]uint32
- _ *byte
+ _ byte
+ Pid uint32
}
type Linger struct {
@@ -265,7 +266,7 @@ const (
SizeofSockaddrAny = 0x6c
SizeofSockaddrUnix = 0x6a
SizeofSockaddrDatalink = 0x36
- SizeofXucred = 0x58
+ SizeofXucred = 0x54
SizeofLinger = 0x8
SizeofIovec = 0x10
SizeofIPMreq = 0x8
diff --git a/unix/ztypes_freebsd_arm.go b/unix/ztypes_freebsd_arm.go
index 3f863d89..a54f4570 100644
--- a/unix/ztypes_freebsd_arm.go
+++ b/unix/ztypes_freebsd_arm.go
@@ -202,7 +202,8 @@ type Xucred struct {
Uid uint32
Ngroups int16
Groups [16]uint32
- _ *byte
+ _ byte
+ Pid uint32
}
type Linger struct {
@@ -267,7 +268,7 @@ const (
SizeofSockaddrAny = 0x6c
SizeofSockaddrUnix = 0x6a
SizeofSockaddrDatalink = 0x36
- SizeofXucred = 0x50
+ SizeofXucred = 0x54
SizeofLinger = 0x8
SizeofIovec = 0x8
SizeofIPMreq = 0x8
diff --git a/unix/ztypes_freebsd_arm64.go b/unix/ztypes_freebsd_arm64.go
index 61c72931..a91ccc72 100644
--- a/unix/ztypes_freebsd_arm64.go
+++ b/unix/ztypes_freebsd_arm64.go
@@ -200,7 +200,8 @@ type Xucred struct {
Uid uint32
Ngroups int16
Groups [16]uint32
- _ *byte
+ _ byte
+ Pid uint32
}
type Linger struct {
@@ -265,7 +266,7 @@ const (
SizeofSockaddrAny = 0x6c
SizeofSockaddrUnix = 0x6a
SizeofSockaddrDatalink = 0x36
- SizeofXucred = 0x58
+ SizeofXucred = 0x54
SizeofLinger = 0x8
SizeofIovec = 0x10
SizeofIPMreq = 0x8
diff --git a/unix/ztypes_freebsd_riscv64.go b/unix/ztypes_freebsd_riscv64.go
index b5d17414..596538d9 100644
--- a/unix/ztypes_freebsd_riscv64.go
+++ b/unix/ztypes_freebsd_riscv64.go
@@ -200,7 +200,8 @@ type Xucred struct {
Uid uint32
Ngroups int16
Groups [16]uint32
- _ *byte
+ _ byte
+ Pid uint32
}
type Linger struct {
@@ -265,7 +266,7 @@ const (
SizeofSockaddrAny = 0x6c
SizeofSockaddrUnix = 0x6a
SizeofSockaddrDatalink = 0x36
- SizeofXucred = 0x58
+ SizeofXucred = 0x54
SizeofLinger = 0x8
SizeofIovec = 0x10
SizeofIPMreq = 0x8
+5 -15
View File
@@ -1,17 +1,7 @@
# sys # sys - rwinkhart patches
This repository holds my custom patches atop the Go sys module.
[![Go Reference](https://pkg.go.dev/badge/golang.org/x/sys.svg)](https://pkg.go.dev/golang.org/x/sys) The only changes in the master branch are this README and the patches in the `1patches` directory. The patches are applied on other branches and tagged releases are available for import from the releases page.
This repository holds supplemental Go packages for low-level interactions with # How To?
the operating system. Copy the desired patch file(s) into a new branch (cloned from upstream master) and apply with `patch -p1 < patchfile.patch`.
## Report Issues / Send Patches
This repository uses Gerrit for code changes. To learn how to submit changes to
this repository, see https://go.dev/doc/contribute.
The git repository is https://go.googlesource.com/sys.
The main issue tracker for the sys repository is located at
https://go.dev/issues. Prefix your issue with "x/sys:" in the
subject line, so it is easy to find.
+1 -1
View File
@@ -1,3 +1,3 @@
module golang.org/x/sys module golang.org/x/sys
go 1.23.0 go 1.24.0
+2 -3
View File
@@ -203,8 +203,7 @@ type Xucred struct {
Uid uint32 Uid uint32
Ngroups int16 Ngroups int16
Groups [16]uint32 Groups [16]uint32
_ byte _ *byte
Pid uint32
} }
type Linger struct { type Linger struct {
@@ -269,7 +268,7 @@ const (
SizeofSockaddrAny = 0x6c SizeofSockaddrAny = 0x6c
SizeofSockaddrUnix = 0x6a SizeofSockaddrUnix = 0x6a
SizeofSockaddrDatalink = 0x36 SizeofSockaddrDatalink = 0x36
SizeofXucred = 0x54 SizeofXucred = 0x50
SizeofLinger = 0x8 SizeofLinger = 0x8
SizeofIovec = 0x8 SizeofIovec = 0x8
SizeofIPMreq = 0x8 SizeofIPMreq = 0x8
+2 -3
View File
@@ -200,8 +200,7 @@ type Xucred struct {
Uid uint32 Uid uint32
Ngroups int16 Ngroups int16
Groups [16]uint32 Groups [16]uint32
_ byte _ *byte
Pid uint32
} }
type Linger struct { type Linger struct {
@@ -266,7 +265,7 @@ const (
SizeofSockaddrAny = 0x6c SizeofSockaddrAny = 0x6c
SizeofSockaddrUnix = 0x6a SizeofSockaddrUnix = 0x6a
SizeofSockaddrDatalink = 0x36 SizeofSockaddrDatalink = 0x36
SizeofXucred = 0x54 SizeofXucred = 0x58
SizeofLinger = 0x8 SizeofLinger = 0x8
SizeofIovec = 0x10 SizeofIovec = 0x10
SizeofIPMreq = 0x8 SizeofIPMreq = 0x8
+2 -3
View File
@@ -202,8 +202,7 @@ type Xucred struct {
Uid uint32 Uid uint32
Ngroups int16 Ngroups int16
Groups [16]uint32 Groups [16]uint32
_ byte _ *byte
Pid uint32
} }
type Linger struct { type Linger struct {
@@ -268,7 +267,7 @@ const (
SizeofSockaddrAny = 0x6c SizeofSockaddrAny = 0x6c
SizeofSockaddrUnix = 0x6a SizeofSockaddrUnix = 0x6a
SizeofSockaddrDatalink = 0x36 SizeofSockaddrDatalink = 0x36
SizeofXucred = 0x54 SizeofXucred = 0x50
SizeofLinger = 0x8 SizeofLinger = 0x8
SizeofIovec = 0x8 SizeofIovec = 0x8
SizeofIPMreq = 0x8 SizeofIPMreq = 0x8
+2 -3
View File
@@ -200,8 +200,7 @@ type Xucred struct {
Uid uint32 Uid uint32
Ngroups int16 Ngroups int16
Groups [16]uint32 Groups [16]uint32
_ byte _ *byte
Pid uint32
} }
type Linger struct { type Linger struct {
@@ -266,7 +265,7 @@ const (
SizeofSockaddrAny = 0x6c SizeofSockaddrAny = 0x6c
SizeofSockaddrUnix = 0x6a SizeofSockaddrUnix = 0x6a
SizeofSockaddrDatalink = 0x36 SizeofSockaddrDatalink = 0x36
SizeofXucred = 0x54 SizeofXucred = 0x58
SizeofLinger = 0x8 SizeofLinger = 0x8
SizeofIovec = 0x10 SizeofIovec = 0x10
SizeofIPMreq = 0x8 SizeofIPMreq = 0x8
+2 -3
View File
@@ -200,8 +200,7 @@ type Xucred struct {
Uid uint32 Uid uint32
Ngroups int16 Ngroups int16
Groups [16]uint32 Groups [16]uint32
_ byte _ *byte
Pid uint32
} }
type Linger struct { type Linger struct {
@@ -266,7 +265,7 @@ const (
SizeofSockaddrAny = 0x6c SizeofSockaddrAny = 0x6c
SizeofSockaddrUnix = 0x6a SizeofSockaddrUnix = 0x6a
SizeofSockaddrDatalink = 0x36 SizeofSockaddrDatalink = 0x36
SizeofXucred = 0x54 SizeofXucred = 0x58
SizeofLinger = 0x8 SizeofLinger = 0x8
SizeofIovec = 0x10 SizeofIovec = 0x10
SizeofIPMreq = 0x8 SizeofIPMreq = 0x8