summaryrefslogtreecommitdiff
path: root/src/managers/KeybindManager.cpp
diff options
context:
space:
mode:
authorJan Beich <jbeich@FreeBSD.org>2023-03-31 19:39:04 +0000
committerGitHub <noreply@github.com>2023-03-31 20:39:04 +0100
commit16bc5997bb764a69433def368169a9f41a077dc6 (patch)
treeb460009ffbf5d8781513e76fae82ba71a13289c0 /src/managers/KeybindManager.cpp
parent7680cd549c73c0bf57606d31fd6e5fd027458b72 (diff)
Misc FreeBSD fixes (#1926)
* helpers: drop incomplete GNU/kFreeBSD bits Debian with FreeBSD kernel lacks Wayland-related packages and is not officially supported since Jessie. * KeybindManager: check VT ioctl availability instead of hardcoding * plugins: add missing header for libc++ after 430778293e4c src/plugins/PluginAPI.cpp:299:33: error: implicit instantiation of undefined template 'std::basic_istringstream<char>' std::istringstream inStream(SYMBOLS); ^ /usr/include/c++/v1/iosfwd:140:32: note: template is declared here class _LIBCPP_TEMPLATE_VIS basic_istringstream; ^ * plugins: prefer llvm-nm with Clang after 430778293e4c nm: invalid option -- j
Diffstat (limited to 'src/managers/KeybindManager.cpp')
-rw-r--r--src/managers/KeybindManager.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp
index ce3bf563..8730fa45 100644
--- a/src/managers/KeybindManager.cpp
+++ b/src/managers/KeybindManager.cpp
@@ -469,11 +469,11 @@ bool CKeybindManager::handleVT(xkb_keysym_t keysym) {
// vtnr is bugged for some reason.
unsigned int ttynum = 0;
-#if defined(__linux__) || defined(__NetBSD__) || defined(__OpenBSD__)
+#if defined(VT_GETSTATE)
struct vt_stat st;
if (!ioctl(0, VT_GETSTATE, &st))
ttynum = st.v_active;
-#elif defined(__DragonFly__) || defined(__FreeBSD__)
+#elif defined(VT_GETACTIVE)
int vt;
if (!ioctl(0, VT_GETACTIVE, &vt))
ttynum = vt;