mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-08-10 05:47:46 +02:00
update go-sqlite3 to v0.18.0 (#3204)
This commit is contained in:
4
vendor/github.com/ncruces/go-sqlite3/vfs/os_darwin.go
generated
vendored
4
vendor/github.com/ncruces/go-sqlite3/vfs/os_darwin.go
generated
vendored
@ -5,6 +5,7 @@ package vfs
|
||||
import (
|
||||
"io"
|
||||
"os"
|
||||
"runtime"
|
||||
"time"
|
||||
|
||||
"golang.org/x/sys/unix"
|
||||
@ -68,7 +69,7 @@ func osUnlock(file *os.File, start, len int64) _ErrorCode {
|
||||
}
|
||||
|
||||
func osLock(file *os.File, typ int16, start, len int64, timeout time.Duration, def _ErrorCode) _ErrorCode {
|
||||
lock := flocktimeout_t{fl: unix.Flock_t{
|
||||
lock := &flocktimeout_t{fl: unix.Flock_t{
|
||||
Type: typ,
|
||||
Start: start,
|
||||
Len: len,
|
||||
@ -82,6 +83,7 @@ func osLock(file *os.File, typ int16, start, len int64, timeout time.Duration, d
|
||||
default:
|
||||
lock.timeout = unix.NsecToTimespec(int64(timeout / time.Nanosecond))
|
||||
err = unix.FcntlFlock(file.Fd(), _F_OFD_SETLKWTIMEOUT, &lock.fl)
|
||||
runtime.KeepAlive(lock)
|
||||
}
|
||||
return osLockErrorCode(err, def)
|
||||
}
|
||||
|
Reference in New Issue
Block a user