🐛 bug: fix gopsutil when compiling for bsd. (#1995)

pull/2004/head
M. Efe Çetin 2022-08-03 17:03:17 +03:00 committed by GitHub
parent 97ba1d16d5
commit 9761f4e797
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -9,9 +9,12 @@ import (
"strings"
"unsafe"
"github.com/gofiber/fiber/v2/internal/gopsutil/common"
"golang.org/x/sys/unix"
)
var invoke common.Invoker = common.Invoke{}
func Avg() (*AvgStat, error) {
return AvgWithContext(context.Background())
}
@ -75,7 +78,7 @@ func MiscWithContext(ctx context.Context) (*MiscStat, error) {
if err != nil {
return nil, err
}
ret.ProcsCreated = f.forks
ret.ProcsCreated = int64(f.forks)
return &ret, nil
}