From c8bc11d61d578841b54e53e2a4a8731b3570cacd Mon Sep 17 00:00:00 2001 From: Dreamacro <8615343+Dreamacro@users.noreply.github.com> Date: Thu, 27 Oct 2022 15:35:53 +0800 Subject: [PATCH] Fix: amd64 macOS Ventura process name match --- component/process/process_darwin.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/component/process/process_darwin.go b/component/process/process_darwin.go index c98453e..814161c 100644 --- a/component/process/process_darwin.go +++ b/component/process/process_darwin.go @@ -18,11 +18,11 @@ const ( ) var structSize = func() int { - value, _ := syscall.Sysctl("kern.osproductversion") + value, _ := syscall.Sysctl("kern.osrelease") major, _, _ := strings.Cut(value, ".") n, _ := strconv.ParseInt(major, 10, 64) switch true { - case n >= 13: + case n >= 22: return 408 default: // from darwin-xnu/bsd/netinet/in_pcblist.c:get_pcblist_n