mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-26 03:12:07 -05:00
23 lines
1 KiB
Diff
23 lines
1 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Julian=20Offenh=C3=A4user?= <offenhaeuser@protonmail.com>
|
|
Date: Tue, 7 Feb 2023 21:25:16 +0100
|
|
Subject: [PATCH] Read the executable path from /proc/self/exe
|
|
|
|
When looking for the executable path, we behave exactly like Linux.
|
|
---
|
|
src/openrct2/platform/Platform.Linux.cpp | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/src/openrct2/platform/Platform.Linux.cpp b/src/openrct2/platform/Platform.Linux.cpp
|
|
index 516c126cfea262448e94a9e883e5b0ea88e4036e..3f3f48b949fd9c6b24a09f8f88b51266c74462f2 100644
|
|
--- a/src/openrct2/platform/Platform.Linux.cpp
|
|
+++ b/src/openrct2/platform/Platform.Linux.cpp
|
|
@@ -129,7 +129,7 @@ namespace Platform
|
|
std::string GetCurrentExecutablePath()
|
|
{
|
|
char exePath[PATH_MAX] = { 0 };
|
|
-# ifdef __linux__
|
|
+# if defined(__linux__) || defined(__serenity__)
|
|
auto bytesRead = readlink("/proc/self/exe", exePath, sizeof(exePath));
|
|
if (bytesRead == -1)
|
|
{
|