src-d / go-billy

The missing interface filesystem abstraction for Go
https://godoc.org/gopkg.in/src-d/go-billy.v4
Apache License 2.0
199 stars 43 forks source link

Building on Illumos Issue #69

Closed Smithx10 closed 5 years ago

Smithx10 commented 5 years ago

Illumos doesn't have sys call.Flock. Could we please use syscall.FcntlFlock ?

# code.gitea.io/git/vendor/gopkg.in/src-d/go-billy.v4/osfs
../git/vendor/gopkg.in/src-d/go-billy.v4/osfs/os_posix.go:13:9: undefined: syscall.Flock
../git/vendor/gopkg.in/src-d/go-billy.v4/osfs/os_posix.go:13:41: undefined: syscall.LOCK_EX
../git/vendor/gopkg.in/src-d/go-billy.v4/osfs/os_posix.go:20:9: undefined: syscall.Flock
../git/vendor/gopkg.in/src-d/go-billy.v4/osfs/os_posix.go:20:41: undefined: syscall.LOCK_UN
Smithx10 commented 5 years ago

https://gitlab.cncf.ci/kubernetes/kubernetes/blob/3412f5b8eb3b3d9991d035193d5989f250343e3f/third_party/forked/etcd237/pkg/fileutil/lock_solaris.go

Smithx10 commented 5 years ago

@mcuadros In the next release of golang, Illumos will have its own build tag... So I believe taking advantage of the native flock system calls should be possible then.