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

@@ -16,6 +16,10 @@ const (
_HOST_NAME_MAX = _MAXHOSTNAMELEN - 1
_LOGIN_NAME_MAX = _MAXLOGNAME
_SYMLOOP_MAX = _MAXSYMLINKS
// _PTHREAD_STACK_MIN changed in macOS 14
_PTHREAD_STACK_MIN_LT_MACOS14 = 0x2000
_PTHREAD_STACK_MIN_GE_MACOS14 = 0x4000
)
var uname struct {
@@ -23,6 +27,21 @@ var uname struct {
macOSMajor int
}
func getMacOSMajor() int {
uname.Once.Do(func() {
var u unix.Utsname
err := unix.Uname(&u)
if err != nil {
return
}
rel := unix.ByteSliceToString(u.Release[:])
ver := strings.Split(rel, ".")
maj, _ := strconv.Atoi(ver[0])
uname.macOSMajor = maj
})
return uname.macOSMajor
}
// sysconf implements sysconf(4) as in the Darwin libc (derived from the FreeBSD
// libc), version 1534.81.1.
// See https://github.com/apple-oss-distributions/Libc/tree/Libc-1534.81.1.
@@ -91,7 +110,10 @@ func sysconf(name int) (int64, error) {
case SC_THREAD_PRIO_PROTECT:
return _POSIX_THREAD_PRIO_PROTECT, nil
case SC_THREAD_STACK_MIN:
return _PTHREAD_STACK_MIN, nil
if getMacOSMajor() < 23 {
return _PTHREAD_STACK_MIN_LT_MACOS14, nil
}
return _PTHREAD_STACK_MIN_GE_MACOS14, nil
case SC_THREAD_THREADS_MAX:
return -1, nil
case SC_TIMER_MAX:
@@ -140,18 +162,7 @@ func sysconf(name int) (int64, error) {
}
return _POSIX_SEMAPHORES, nil
case SC_SPAWN:
uname.Once.Do(func() {
var u unix.Utsname
err := unix.Uname(&u)
if err != nil {
return
}
rel := unix.ByteSliceToString(u.Release[:])
ver := strings.Split(rel, ".")
maj, _ := strconv.Atoi(ver[0])
uname.macOSMajor = maj
})
if uname.macOSMajor < 22 {
if getMacOSMajor() < 22 {
return -1, nil
}
// macOS 13 (Ventura) and later