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
2 changed files with 120 additions and 15 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
the operating system.
## 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.
# How To?
Copy the desired patch file(s) into a new branch (cloned from upstream master) and apply with `patch -p1 < patchfile.patch`.