diff options
| author | Brad Smith <brad@comstyle.com> | 2026-09-13 05:42:15 -0400 |
|---|---|---|
| committer | Brad Smith <brad@comstyle.com> | 2026-09-15 00:49:03 -0400 |
| commit | 71165c82a56292cdb5f2c78b4e8bfb46d8dadb02 (patch) | |
| tree | eb68e1c2ed956d269db7d10a2a7f1a2344fd8c1a /Source/Core/Common/FileUtil.cpp | |
| parent | c185d27ede09771fe93a3b520c576f646f937ed9 (diff) | |
Implement File::GetExePath() for OpenBSD with getexecpath()
Diffstat (limited to 'Source/Core/Common/FileUtil.cpp')
| -rw-r--r-- | Source/Core/Common/FileUtil.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/Core/Common/FileUtil.cpp b/Source/Core/Common/FileUtil.cpp index 053614f31f..ba52f63094 100644 --- a/Source/Core/Common/FileUtil.cpp +++ b/Source/Core/Common/FileUtil.cpp @@ -740,6 +740,11 @@ std::string GetExePath() if (sysctl(name, 4, dolphin_exe_path.data(), &length, nullptr, 0) != 0) return {}; return dolphin_exe_path; +#elif defined(__OpenBSD__) && defined(HAVE_GETEXECPATH) + char dolphin_exe_path[PATH_MAX]; + if (getexecpath(dolphin_exe_path, sizeof(dolphin_exe_path)) != 0) + return {}; + return dolphin_exe_path; #else char dolphin_exe_path[PATH_MAX]; ssize_t len = ::readlink("/proc/self/exe", dolphin_exe_path, sizeof(dolphin_exe_path)); |
