diff --git a/src/main.cpp b/src/main.cpp index 84ba583..63f5ae9 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -5,7 +5,9 @@ #include #include #include +#if defined(__linux__) #include +#endif #include #include #include @@ -435,6 +437,7 @@ int main(int argc, char **argv) } } +#if defined(__linux__) cap_t caps = cap_get_proc(); if ( caps != nullptr ) { @@ -478,6 +481,7 @@ int main(int argc, char **argv) { fprintf( stderr, "No CAP_SYS_NICE, falling back to regular-priority compute and threads.\nPerformance will be affected.\n" ); } +#endif setenv( "XWAYLAND_FORCE_ENABLE_EXTRA_MODES", "1", 1 ); diff --git a/src/meson.build b/src/meson.build index 704daba..401466e 100644 --- a/src/meson.build +++ b/src/meson.build @@ -13,7 +13,7 @@ wayland_server = dependency('wayland-server', version: '>=1.21') wayland_protos = dependency('wayland-protocols', version: '>=1.17') xkbcommon = dependency('xkbcommon') thread_dep = dependency('threads') -cap_dep = dependency('libcap') +cap_dep = dependency('libcap', required: false) sdl_dep = dependency('SDL2') stb_dep = dependency('stb')