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 @@ -850,7 +850,7 @@ std::string fs_get_cache_directory() {
850850 if (getenv (" LLAMA_CACHE" )) {
851851 cache_directory = std::getenv (" LLAMA_CACHE" );
852852 } else {
853- #ifdef __linux__
853+ #if defined( __linux__) || defined(__FreeBSD__)
854854 if (std::getenv (" XDG_CACHE_HOME" )) {
855855 cache_directory = std::getenv (" XDG_CACHE_HOME" );
856856 } else {
@@ -860,7 +860,9 @@ std::string fs_get_cache_directory() {
860860 cache_directory = std::getenv (" HOME" ) + std::string (" /Library/Caches/" );
861861#elif defined(_WIN32)
862862 cache_directory = std::getenv (" LOCALAPPDATA" );
863- #endif // __linux__
863+ #else
864+ # error Unknown architecture
865+ #endif
864866 cache_directory = ensure_trailing_slash (cache_directory);
865867 cache_directory += " llama.cpp" ;
866868 }
You can’t perform that action at this time.
0 commit comments