浏览代码

get_executable_path slight change to make it work under OpenBSD

(cherry picked from commit df87ad14d0be851ecdc02e592c3593b696762d26)
David Carlier 8 年之前
父节点
当前提交
14392c9798
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      drivers/unix/os_unix.cpp

+ 2 - 2
drivers/unix/os_unix.cpp

@@ -49,7 +49,7 @@
 #include <mach-o/dyld.h>
 #include <mach-o/dyld.h>
 #endif
 #endif
 
 
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) || defined(__OpenBSD__)
 #include <sys/param.h>
 #include <sys/param.h>
 #endif
 #endif
 #include "globals.h"
 #include "globals.h"
@@ -499,7 +499,7 @@ String OS_Unix::get_executable_path() const {
 		return OS::get_executable_path();
 		return OS::get_executable_path();
 	}
 	}
 	return b;
 	return b;
-#elif defined(__FreeBSD__)
+#elif defined(__FreeBSD__) || defined(__OpenBSD__)
 	char resolved_path[MAXPATHLEN];
 	char resolved_path[MAXPATHLEN];
 
 
 	realpath(OS::get_executable_path().utf8().get_data(), resolved_path);
 	realpath(OS::get_executable_path().utf8().get_data(), resolved_path);