mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-04 06:01:56 -07:00
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++ after430778293e
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 after430778293e
nm: invalid option -- j
This commit is contained in:
@@ -7,6 +7,8 @@
|
||||
#include <sys/sysctl.h>
|
||||
#endif
|
||||
|
||||
#include <sstream>
|
||||
|
||||
APICALL bool HyprlandAPI::registerCallbackStatic(HANDLE handle, const std::string& event, HOOK_CALLBACK_FN* fn) {
|
||||
auto* const PLUGIN = g_pPluginSystem->getPluginByHandle(handle);
|
||||
|
||||
@@ -277,8 +279,13 @@ APICALL std::vector<SFunctionMatch> HyprlandAPI::findFunctionsByName(HANDLE hand
|
||||
const auto FPATH = std::filesystem::canonical("/proc/self/exe");
|
||||
#endif
|
||||
|
||||
#ifdef __clang__
|
||||
const auto SYMBOLS = execAndGet(("llvm-nm -D -j " + FPATH.string()).c_str());
|
||||
const auto SYMBOLSDEMANGLED = execAndGet(("llvm-nm -D -j --demangle " + FPATH.string()).c_str());
|
||||
#else
|
||||
const auto SYMBOLS = execAndGet(("nm -D -j " + FPATH.string()).c_str());
|
||||
const auto SYMBOLSDEMANGLED = execAndGet(("nm -D -j --demangle=auto " + FPATH.string()).c_str());
|
||||
#endif
|
||||
|
||||
auto demangledFromID = [&](size_t id) -> std::string {
|
||||
size_t pos = 0;
|
||||
|
Reference in New Issue
Block a user