From 8fd92df7ae7ceb577c1b5d3222d7b9bd532dea0d Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 29 Jul 2018 12:54:24 +0530 Subject: [PATCH] Also fix launcher for netbsd --- linux-launcher.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/linux-launcher.c b/linux-launcher.c index 6f68cf165..58b788f2a 100644 --- a/linux-launcher.c +++ b/linux-launcher.c @@ -109,6 +109,14 @@ read_exe_path(char *exe, size_t buf_sz) { } return true; } +#elif defined(__NetBSD__) + +static inline bool +read_exe_path(char *exe, size_t buf_sz) { + if (realpath("/proc/curproc/exe", exe) == NULL) { fprintf(stderr, "Failed to read /proc/self/exe\n"); return false; } + return true; +} + #else static inline bool