diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2017-10-20 12:42:02 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-20 12:42:02 +0200 |
commit | 3517e791cef631318880c68a5712aebfa7eaec49 (patch) | |
tree | b273015a5bf24c0e23d808959ef3eb307aad9754 | |
parent | 5e348e72c1c82ec99dee10767dddb40d30b01999 (diff) | |
parent | 2baf54526b9a1c97e6af5328903363595aec4125 (diff) |
Merge pull request #12190 from marcelofg55/bsd_fixes
Fix BSD compile issues
[ci skip]
-rw-r--r-- | platform/x11/detect.py | 3 | ||||
-rw-r--r-- | platform/x11/os_x11.cpp | 6 | ||||
-rw-r--r-- | thirdparty/enet/enet/enet.h | 1 |
3 files changed, 10 insertions, 0 deletions
diff --git a/platform/x11/detect.py b/platform/x11/detect.py index 1f7f67fe10..8c68c9ffd1 100644 --- a/platform/x11/detect.py +++ b/platform/x11/detect.py @@ -239,6 +239,9 @@ def configure(env): if (platform.system() == "Linux"): env.Append(LIBS=['dl']) + if (platform.system().find("BSD") >= 0): + env.Append(LIBS=['execinfo']) + ## Cross-compilation if (is64 and env["bits"] == "32"): diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp index bc18d0c1f0..48e2d8f81e 100644 --- a/platform/x11/os_x11.cpp +++ b/platform/x11/os_x11.cpp @@ -35,7 +35,11 @@ #include "servers/physics/physics_server_sw.h" #include "servers/visual/visual_server_raster.h" #include "servers/visual/visual_server_wrap_mt.h" + +#ifdef HAVE_MNTENT #include <mntent.h> +#endif + #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -2182,6 +2186,7 @@ static String get_mountpoint(const String &p_path) { return ""; } +#ifdef HAVE_MNTENT dev_t dev = s.st_dev; FILE *fd = setmntent("/proc/mounts", "r"); if (!fd) { @@ -2199,6 +2204,7 @@ static String get_mountpoint(const String &p_path) { } endmntent(fd); +#endif return ""; } diff --git a/thirdparty/enet/enet/enet.h b/thirdparty/enet/enet/enet.h index 8c9ad5463e..246cbb0a62 100644 --- a/thirdparty/enet/enet/enet.h +++ b/thirdparty/enet/enet/enet.h @@ -10,6 +10,7 @@ extern "C" { #endif +#include <stdint.h> #include <stdlib.h> #include "enet/godot.h" |