fix(deps): update module github.com/crc-org/vfkit to v0.6.1

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This commit is contained in:
renovate[bot]
2025-05-12 15:14:39 +00:00
committed by GitHub
parent 74f04e9118
commit 6a96f70180
72 changed files with 785 additions and 273 deletions

View File

@@ -25,10 +25,10 @@ const (
_POSIX2_UPE = -1
)
var (
clktck int64
clktckOnce sync.Once
)
var clktck struct {
sync.Once
v int64
}
func sysconfPOSIX(name int) (int64, error) {
// NetBSD does not define all _POSIX_* values used in sysconf_posix.go
@@ -42,7 +42,6 @@ func sysconf(name int) (int64, error) {
// Duplicate the relevant values here.
switch name {
// 1003.1
case SC_ARG_MAX:
return sysctl32("kern.argmax"), nil
@@ -55,13 +54,14 @@ func sysconf(name int) (int64, error) {
}
return -1, nil
case SC_CLK_TCK:
clktckOnce.Do(func() {
clktck = -1
// TODO: use sync.OnceValue once Go 1.21 is the minimal supported version
clktck.Do(func() {
clktck.v = -1
if ci, err := unix.SysctlClockinfo("kern.clockrate"); err == nil {
clktck = int64(ci.Hz)
clktck.v = int64(ci.Hz)
}
})
return clktck, nil
return clktck.v, nil
case SC_NGROUPS_MAX:
return sysctl32("kern.ngroups"), nil
case SC_JOB_CONTROL: