summaryrefslogtreecommitdiff
path: root/src/file.cc
diff options
context:
space:
mode:
authorluka null <luka.devnull@vivaldi.net>2020-09-18 05:22:25 -0500
committerluka null <luka.devnull@vivaldi.net>2020-09-18 05:22:25 -0500
commit1296922d66c22886efa57aecaa7247e2edfd68f9 (patch)
tree6c8c17b689f094173db77e7628a39bf07a3b60e2 /src/file.cc
parentcfbff4e132c8d0aed8bcaf677b25f5ab3a9c3221 (diff)
Add illumos/Solaris support
Diffstat (limited to 'src/file.cc')
-rw-r--r--src/file.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/file.cc b/src/file.cc
index 88c502d1..ce6f8405 100644
--- a/src/file.cc
+++ b/src/file.cc
@@ -654,6 +654,11 @@ String get_kak_binary_path()
return buffer;
#elif defined(__OpenBSD__)
return KAK_BIN_PATH;
+#elif defined(__sun__)
+ ssize_t res = readlink("/proc/self/path/a.out", buffer, 2048);
+ kak_assert(res != -1);
+ buffer[res] = '\0';
+ return buffer;
#else
# error "finding executable path is not implemented on this platform"
#endif