From 9392a0e3691f3663bbff9175b90b828daeea0076 Mon Sep 17 00:00:00 2001 From: Christoph Moench-Tegeder Date: Fri, 19 Dec 2025 23:38:15 +0100 Subject: [PATCH] Include sys/sysctl.h on FreeBSD when using sysctl() The ApplicationDirectories::findHomePath() on BSD uses sysctl() to find the path to the running executable. On FreeBSD, we need to include sys/sysctl.h for that - and as it is not included anywhere else, add it to the includes directly in front of this function, with a suitable ifdef. --- src/App/ApplicationDirectories.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/App/ApplicationDirectories.cpp b/src/App/ApplicationDirectories.cpp index 4d21b3d825..27f4fa6188 100644 --- a/src/App/ApplicationDirectories.cpp +++ b/src/App/ApplicationDirectories.cpp @@ -630,6 +630,9 @@ fs::path ApplicationDirectories::findHomePath(const char* sCall) #include #include #include +#if defined(__FreeBSD__) +#include +#endif fs::path ApplicationDirectories::findHomePath(const char* sCall) {