Update ggml/src/ggml-backend-reg.cpp

This commit is contained in:
Diego Devesa 2024-12-23 00:59:00 +01:00 committed by GitHub
parent a68c7eeec5
commit 5887497cdc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -407,11 +407,11 @@ static std::string get_executable_path() {
std::vector<char> path(1024);
while (true) {
// get executable path
# if defined(__linux__)
# if defined(__linux__)
ssize_t len = readlink("/proc/self/exe", path.data(), path.size());
# elif defined(__FreeBSD__)
# elif defined(__FreeBSD__)
ssize_t len = readlink("/proc/curproc/file", path.data(), path.size());
# endif
# endif
if (len == -1) {
break;
}