Compilation fails on windows
sni opened this issue · comments
Sven Nierlein commented
Building anything on windows fails with:
# github.com/sevlyar/go-daemon
../../../../sevlyar/go-daemon/lock_file_unix.go:9:6: lockFile redeclared in this block
previous declaration at ../../../../sevlyar/go-daemon/lock_file_stub.go:5:27
../../../../sevlyar/go-daemon/lock_file_unix.go:10:9: undefined: syscall.Flock
../../../../sevlyar/go-daemon/lock_file_unix.go:10:32: undefined: syscall.LOCK_EX
../../../../sevlyar/go-daemon/lock_file_unix.go:10:48: undefined: syscall.LOCK_NB
../../../../sevlyar/go-daemon/lock_file_unix.go:17:6: unlockFile redeclared in this block
previous declaration at ../../../../sevlyar/go-daemon/lock_file_stub.go:9:29
../../../../sevlyar/go-daemon/lock_file_unix.go:18:9: undefined: syscall.Flock
../../../../sevlyar/go-daemon/lock_file_unix.go:18:32: undefined: syscall.LOCK_UN
snowie2000 commented
There is a bug on compiler tag:
The !solars
part of // +build darwin dragonfly freebsd linux netbsd openbsd plan9 !solaris
actually commands the compiler to compile it on any platform other than solars.
Remove it and it should work.