From 66d7d2549f3b1673f78f8e6eb2573b83bd5f5a4a Mon Sep 17 00:00:00 2001 From: Nahum Shalman Date: Sun, 28 Aug 2022 14:41:41 +0000 Subject: [PATCH] logger: migrate rusage syscall use to x/sys/unix This will be helpful for illumos (#697) and should be safe everywhere else. Signed-off-by: Nahum Shalman --- types/logger/rusage_syscall.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/types/logger/rusage_syscall.go b/types/logger/rusage_syscall.go index b767718ac..ad1f39411 100644 --- a/types/logger/rusage_syscall.go +++ b/types/logger/rusage_syscall.go @@ -9,12 +9,13 @@ package logger import ( "runtime" - "syscall" + + "golang.org/x/sys/unix" ) func rusageMaxRSS() float64 { - var ru syscall.Rusage - err := syscall.Getrusage(syscall.RUSAGE_SELF, &ru) + var ru unix.Rusage + err := unix.Getrusage(unix.RUSAGE_SELF, &ru) if err != nil { return 0 }