aboutsummaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorFabio Alessandrelli2018-03-01 01:25:16 +0100
committerHein-Pieter van Braam2018-03-01 21:12:28 +0100
commit44b206a3fa1c3b16041ee77ace409b20ac64664b (patch)
tree1e10e4d159593bb22c738fe93abab900e25ddaff /platform
parent675899a521422a97835660b5a7b09dad851884d0 (diff)
downloadgodot-44b206a3fa1c3b16041ee77ace409b20ac64664b.tar.gz
godot-44b206a3fa1c3b16041ee77ace409b20ac64664b.tar.zst
godot-44b206a3fa1c3b16041ee77ace409b20ac64664b.zip
Diffstat (limited to 'platform')
-rw-r--r--platform/server/detect.py8
-rw-r--r--platform/server/platform_config.h6
-rw-r--r--platform/x11/crash_handler_x11.cpp3
3 files changed, 15 insertions, 2 deletions
diff --git a/platform/server/detect.py b/platform/server/detect.py
index f550cca22..77193e592 100644
--- a/platform/server/detect.py
+++ b/platform/server/detect.py
@@ -1,4 +1,5 @@
import os
+import platform
import sys
@@ -135,7 +136,12 @@ def configure(env):
env.Append(CPPPATH=['#platform/server'])
env.Append(CPPFLAGS=['-DSERVER_ENABLED', '-DUNIX_ENABLED'])
env.Append(LIBS=['pthread'])
- env.Append(LIBS=['dl'])
+
+ if (platform.system() == "Linux"):
+ env.Append(LIBS=['dl'])
+
+ if (platform.system().find("BSD") >= 0):
+ env.Append(LIBS=['execinfo'])
# Link those statically for portability
if env['use_static_cpp']:
diff --git a/platform/server/platform_config.h b/platform/server/platform_config.h
index af4cf0739..2fa8eda33 100644
--- a/platform/server/platform_config.h
+++ b/platform/server/platform_config.h
@@ -28,4 +28,10 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
+#ifdef __linux__
#include <alloca.h>
+#endif
+#if defined(__FreeBSD__) || defined(__OpenBSD__)
+#include <stdlib.h>
+#define PTHREAD_BSD_SET_NAME
+#endif
diff --git a/platform/x11/crash_handler_x11.cpp b/platform/x11/crash_handler_x11.cpp
index 43b9051ea..d39fc33f8 100644
--- a/platform/x11/crash_handler_x11.cpp
+++ b/platform/x11/crash_handler_x11.cpp
@@ -32,8 +32,9 @@
#define CRASH_HANDLER_ENABLED 1
#endif
+#include "crash_handler_x11.h"
#include "main/main.h"
-#include "os_x11.h"
+#include "os/os.h"
#include "project_settings.h"
#ifdef CRASH_HANDLER_ENABLED