From 72cbb4077c98d2de7b9e9257979d1237ec817421 Mon Sep 17 00:00:00 2001 From: Ilya Sevostyanov Date: Tue, 1 Oct 2019 22:02:40 +0300 Subject: [PATCH] Fix compilation on illumos. Fixes #765 --- internal/dirlock/dirlock.go | 2 +- internal/dirlock/dirlock_illumos.go | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 internal/dirlock/dirlock_illumos.go diff --git a/internal/dirlock/dirlock.go b/internal/dirlock/dirlock.go index 88d5d75f9..0e7bd3844 100644 --- a/internal/dirlock/dirlock.go +++ b/internal/dirlock/dirlock.go @@ -1,4 +1,4 @@ -// +build !windows +// +build !windows !illumos package dirlock diff --git a/internal/dirlock/dirlock_illumos.go b/internal/dirlock/dirlock_illumos.go new file mode 100644 index 000000000..b6c93236a --- /dev/null +++ b/internal/dirlock/dirlock_illumos.go @@ -0,0 +1,21 @@ +// +build illumos + +package dirlock + +type DirLock struct { + dir string +} + +func New(dir string) *DirLock { + return &DirLock{ + dir: dir, + } +} + +func (l *DirLock) Lock() error { + return nil +} + +func (l *DirLock) Unlock() error { + return nil +}