blob: d1d6000526690312cdc970af42dbaefb06b784f1 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
--- source/system/environment.cpp.orig 2026-02-27 14:10:30 UTC
+++ source/system/environment.cpp
@@ -21,7 +21,7 @@
#include <locale>
#include <sstream>
-#if defined(__APPLE__)
+#if defined(__APPLE__) || defined(__FreeBSD__)
#include <sys/sysctl.h>
extern char **environ;
#elif defined(unix) || defined(__unix) || defined(__unix__)
@@ -50,7 +50,7 @@ bool Environment::Is64BitOS()
bool Environment::Is64BitOS()
{
-#if defined(__APPLE__)
+#if defined(__APPLE__) || defined(__FreeBSD__)
return true;
#elif defined(linux) || defined(__linux) || defined(__linux__)
struct stat buffer;
@@ -119,7 +119,7 @@ std::string Environment::OSVersion()
std::string Environment::OSVersion()
{
-#if defined(__APPLE__)
+#if defined(__APPLE__) || defined(__FreeBSD__)
char result[1024];
size_t size = sizeof(result);
if (sysctlbyname("kern.osrelease", result, &size, nullptr, 0) == 0)
|