diff --git a/hotkey_linux.c b/hotkey_x11.c similarity index 98% rename from hotkey_linux.c rename to hotkey_x11.c index 0cb8b1c..5ab3565 100644 --- a/hotkey_linux.c +++ b/hotkey_x11.c @@ -4,7 +4,7 @@ // // Written by Changkun Ou -//go:build linux +//go:build linux || openbsd #include #include @@ -74,4 +74,4 @@ int waitHotkey(uintptr_t hkhandle, unsigned int mod, int key) { return 0; } } -} \ No newline at end of file +} diff --git a/hotkey_linux.go b/hotkey_x11.go similarity index 97% rename from hotkey_linux.go rename to hotkey_x11.go index f3be4fa..0a082d6 100644 --- a/hotkey_linux.go +++ b/hotkey_x11.go @@ -4,12 +4,14 @@ // // Written by Changkun Ou -//go:build linux +//go:build linux || openbsd package hotkey /* #cgo LDFLAGS: -lX11 +#cgo openbsd LDFLAGS: -L/usr/X11R6/lib -lX11 +#cgo openbsd CFLAGS: -I/usr/X11R6/include #include diff --git a/hotkey_linux_test.go b/hotkey_x11_test.go similarity index 96% rename from hotkey_linux_test.go rename to hotkey_x11_test.go index 5c70d75..da8d3f9 100644 --- a/hotkey_linux_test.go +++ b/hotkey_x11_test.go @@ -4,7 +4,7 @@ // // Written by Changkun Ou -//go:build linux && cgo +//go:build (linux || openbsd) && cgo package hotkey_test diff --git a/mainthread/os.go b/mainthread/os.go index 605bf39..2886470 100644 --- a/mainthread/os.go +++ b/mainthread/os.go @@ -4,7 +4,7 @@ // // Written by Changkun Ou -//go:build windows || linux || (darwin && !cgo) +//go:build windows || linux || openbsd || (darwin && !cgo) package mainthread