1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-29 04:57:44 +00:00

Ports: Add a kakoune port

This commit is contained in:
demostanis 2022-09-10 18:17:36 +02:00 committed by Linus Groh
parent 6880359064
commit fe94636ac3
5 changed files with 110 additions and 0 deletions

View file

@ -0,0 +1,25 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: demostanis <demostanis@protonmail.com>
Date: Sat, 10 Sep 2022 20:19:23 +0200
Subject: [PATCH] Use /proc/self/exe on SerenityOS
---
src/file.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/file.cc b/src/file.cc
index d38c956..9c74364 100644
--- a/src/file.cc
+++ b/src/file.cc
@@ -603,7 +603,7 @@ FsStatus get_fs_status(StringView filename)
String get_kak_binary_path()
{
char buffer[2048];
-#if defined(__linux__) or defined(__CYGWIN__) or defined(__gnu_hurd__)
+#if defined(__linux__) or defined(__CYGWIN__) or defined(__gnu_hurd__) or defined(__serenity__)
ssize_t res = readlink("/proc/self/exe", buffer, 2048);
kak_assert(res != -1);
buffer[res] = '\0';
--
2.37.3