You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-08 12:40:44 +00:00
NetBSD: Implement OS_Unix::get_executable_path()
Same implementation as OpenBSD seems to work fine.
(cherry picked from commit 01185acecb)
This commit is contained in:
@@ -48,7 +48,7 @@
|
|||||||
#include <mach/mach_time.h>
|
#include <mach/mach_time.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__FreeBSD__) || defined(__OpenBSD__)
|
#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/sysctl.h>
|
#include <sys/sysctl.h>
|
||||||
#endif
|
#endif
|
||||||
@@ -509,7 +509,7 @@ String OS_Unix::get_executable_path() const {
|
|||||||
return OS::get_executable_path();
|
return OS::get_executable_path();
|
||||||
}
|
}
|
||||||
return b;
|
return b;
|
||||||
#elif defined(__OpenBSD__)
|
#elif defined(__OpenBSD__) || defined(__NetBSD__)
|
||||||
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);
|
||||||
|
|||||||
Reference in New Issue
Block a user