This commit is contained in:
Kovid Goyal 2018-07-29 13:06:26 +05:30
parent 8fd92df7ae
commit 29f9394257
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -93,6 +93,7 @@ read_exe_path(char *exe, size_t buf_sz) {
char apple[PATH_MAX+1] = {0};
if (_NSGetExecutablePath(apple, &size) != 0) { fprintf(stderr, "Failed to get path to executable\n"); return false; }
if (realpath(apple, exe) == NULL) { fprintf(stderr, "realpath() failed on the executable's path\n"); return false; }
return true;
}
#elif defined(__FreeBSD__)
#include <sys/param.h>