File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -830,7 +830,7 @@ std::string fs_get_cache_directory() {
830830 if (getenv (" LLAMA_CACHE" )) {
831831 cache_directory = std::getenv (" LLAMA_CACHE" );
832832 } else {
833- #ifdef __linux__
833+ #if defined( __linux__) || defined(__FreeBSD__)
834834 if (std::getenv (" XDG_CACHE_HOME" )) {
835835 cache_directory = std::getenv (" XDG_CACHE_HOME" );
836836 } else {
@@ -840,7 +840,9 @@ std::string fs_get_cache_directory() {
840840 cache_directory = std::getenv (" HOME" ) + std::string (" /Library/Caches/" );
841841#elif defined(_WIN32)
842842 cache_directory = std::getenv (" LOCALAPPDATA" );
843- #endif // __linux__
843+ #else
844+ # error Unknown architecture
845+ #endif
844846 cache_directory = ensure_trailing_slash (cache_directory);
845847 cache_directory += " llama.cpp" ;
846848 }
You can’t perform that action at this time.
0 commit comments