summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2017-07-16 12:22:32 +0200
committerGitHub <noreply@github.com>2017-07-16 12:22:32 +0200
commit40ab9adec3bd117e048ac477fcd9399e115f52f5 (patch)
tree1f272e4c72d645a0f63ea7e9ddc845486991ea38
parent2b7b67b7b11fcd3a198b0df0679d286e93a16154 (diff)
parentdf87ad14d0be851ecdc02e592c3593b696762d26 (diff)
Merge pull request #9665 from devnexen/get_executable_path_fix
get_executable_path slight change to make it work under OpenBSD
-rw-r--r--drivers/unix/os_unix.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/unix/os_unix.cpp b/drivers/unix/os_unix.cpp
index 75f40cacca..479d97e563 100644
--- a/drivers/unix/os_unix.cpp
+++ b/drivers/unix/os_unix.cpp
@@ -50,7 +50,7 @@
#include <mach-o/dyld.h>
#endif
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) || defined(__OpenBSD__)
#include <sys/param.h>
#endif
#include "global_config.h"
@@ -532,7 +532,7 @@ String OS_Unix::get_executable_path() const {
return OS::get_executable_path();
}
return b;
-#elif defined(__FreeBSD__)
+#elif defined(__FreeBSD__) || defined(__OpenBSD__)
char resolved_path[MAXPATHLEN];
realpath(OS::get_executable_path().utf8().get_data(), resolved_path);