Cannot build my code on FreeBSD
probonopd opened this issue · comments
Getting
./inotify.go:41:34: undefined: "github.com/rjeczalik/notify".InCloseWrite
./inotify.go:41:55: undefined: "github.com/rjeczalik/notify".InMovedTo
./inotify.go:42:3: undefined: "github.com/rjeczalik/notify".InMovedFrom
./inotify.go:42:23: undefined: "github.com/rjeczalik/notify".InDelete
./inotify.go:43:3: undefined: "github.com/rjeczalik/notify".InDeleteSelf
./inotify.go:51:8: undefined: "github.com/rjeczalik/notify".InDeleteSelf
The code I am using compiles and seems to work on Linux.
Am I doing it wrong, is there a more cross-OS portable way of doing things?
What Linux distro do you use?
…On Sat 29. Aug 2020 at 13:08, probonopd ***@***.***> wrote:
Getting
./inotify.go:41:34: undefined: "github.com/rjeczalik/notify".InCloseWrite
./inotify.go:41:55: undefined: "github.com/rjeczalik/notify".InMovedTo
./inotify.go:42:3: undefined: "github.com/rjeczalik/notify".InMovedFrom
./inotify.go:42:23: undefined: "github.com/rjeczalik/notify".InDelete
./inotify.go:43:3: undefined: "github.com/rjeczalik/notify".InDeleteSelf
./inotify.go:51:8: undefined: "github.com/rjeczalik/notify".InDeleteSelf
My code compiles and seems to work on Linux.
Am I doing it wrong?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#189>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAI3WIL3O3EVCYI7UTXCBR3SDDOTDANCNFSM4QO5ZX6Q>
.
Those are inotify specific events, and BSDs have kqueue not inotify. For cross-compatibility you need to use the common events (https://github.com/rjeczalik/notify/blob/master/event.go#L22) or define platform specific events behind build flags.