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.
This commit is contained in:
committed by
Chris Hennes
parent
3461e0fed7
commit
9392a0e369
@@ -630,6 +630,9 @@ fs::path ApplicationDirectories::findHomePath(const char* sCall)
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <sys/param.h>
|
||||
#if defined(__FreeBSD__)
|
||||
#include <sys/sysctl.h>
|
||||
#endif
|
||||
|
||||
fs::path ApplicationDirectories::findHomePath(const char* sCall)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user