aboutsummaryrefslogtreecommitdiff
path: root/misc/ollama/files/patch-ml_backend_ggml_ggml_src_ggml-backend-reg.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'misc/ollama/files/patch-ml_backend_ggml_ggml_src_ggml-backend-reg.cpp')
-rw-r--r--misc/ollama/files/patch-ml_backend_ggml_ggml_src_ggml-backend-reg.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/misc/ollama/files/patch-ml_backend_ggml_ggml_src_ggml-backend-reg.cpp b/misc/ollama/files/patch-ml_backend_ggml_ggml_src_ggml-backend-reg.cpp
new file mode 100644
index 000000000000..17d3116f0faa
--- /dev/null
+++ b/misc/ollama/files/patch-ml_backend_ggml_ggml_src_ggml-backend-reg.cpp
@@ -0,0 +1,18 @@
+--- ml/backend/ggml/ggml/src/ggml-backend-reg.cpp.orig 2025-11-29 00:42:10.354754000 -0800
++++ ml/backend/ggml/ggml/src/ggml-backend-reg.cpp 2025-11-29 00:42:20.531699000 -0800
+@@ -538,11 +538,13 @@
+ std::vector<fs::path> search_paths;
+ if (user_search_path == nullptr) {
+ #ifdef GGML_BACKEND_DIR
++ // On FreeBSD, GGML_BACKEND_DIR is set to the correct library directory
+ search_paths.push_back(fs::u8path(GGML_BACKEND_DIR));
+-#endif
+- // default search paths: executable directory, current directory
++#else
++ // Fallback: search executable directory and current directory
+ search_paths.push_back(get_executable_path());
+ search_paths.push_back(fs::current_path());
++#endif
+ } else {
+ search_paths.push_back(fs::u8path(user_search_path));
+ }