From f72c599d2d9026aca0a6e64b00b063f4976128a2 Mon Sep 17 00:00:00 2001 From: Nuno Cruces Date: Mon, 13 Feb 2023 13:51:35 +0000 Subject: [PATCH] illumos OFD locks. --- vfs_lock_test.go | 2 +- vfs_unix.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/vfs_lock_test.go b/vfs_lock_test.go index f2b2740..13ebce4 100644 --- a/vfs_lock_test.go +++ b/vfs_lock_test.go @@ -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() diff --git a/vfs_unix.go b/vfs_unix.go index c12b9e8..3c24ee0 100644 --- a/vfs_unix.go +++ b/vfs_unix.go @@ -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 }