mirror of
https://github.com/ncruces/go-sqlite3.git
synced 2026-01-11 21:49:13 +00:00
illumos OFD locks.
This commit is contained in:
@@ -10,7 +10,7 @@ import (
|
||||
func Test_vfsLock(t *testing.T) {
|
||||
// Other OSes lack open file descriptors locks.
|
||||
switch runtime.GOOS {
|
||||
case "linux", "darwin", "solaris", "windows":
|
||||
case "linux", "darwin", "illumos", "windows":
|
||||
//
|
||||
default:
|
||||
t.Skip()
|
||||
|
||||
@@ -117,7 +117,7 @@ func (l *vfsFileLocker) fcntlGetLock(lock *syscall.Flock_t) error {
|
||||
case "darwin":
|
||||
// https://github.com/apple/darwin-xnu/blob/main/bsd/sys/fcntl.h
|
||||
F_GETLK = 92 // F_OFD_GETLK
|
||||
case "solaris":
|
||||
case "illumos":
|
||||
// https://github.com/illumos/illumos-gate/blob/master/usr/src/uts/common/sys/fcntl.h
|
||||
F_GETLK = 47 // F_OFD_GETLK
|
||||
}
|
||||
@@ -133,7 +133,7 @@ func (l *vfsFileLocker) fcntlSetLock(lock *syscall.Flock_t) error {
|
||||
case "darwin":
|
||||
// https://github.com/apple/darwin-xnu/blob/main/bsd/sys/fcntl.h
|
||||
F_SETLK = 90 // F_OFD_SETLK
|
||||
case "solaris":
|
||||
case "illumos":
|
||||
// https://github.com/illumos/illumos-gate/blob/master/usr/src/uts/common/sys/fcntl.h
|
||||
F_SETLK = 48 // F_OFD_SETLK
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user