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 @@ -126,7 +126,7 @@ static std::string fs_get_cache_directory() {
126126 if (getenv (" LLAMA_CACHE" )) {
127127 cache_directory = std::getenv (" LLAMA_CACHE" );
128128 } else {
129- #ifdef __linux__
129+ #if defined( __linux__) || defined(__FreeBSD__)
130130 if (std::getenv (" XDG_CACHE_HOME" )) {
131131 cache_directory = std::getenv (" XDG_CACHE_HOME" );
132132 } else {
@@ -136,7 +136,9 @@ static std::string fs_get_cache_directory() {
136136 cache_directory = std::getenv (" HOME" ) + std::string (" /Library/Caches/" );
137137#elif defined(_WIN32)
138138 cache_directory = std::getenv (" LOCALAPPDATA" );
139- #endif // __linux__
139+ #else
140+ # error Unknown architecture
141+ #endif
140142 cache_directory = ensure_trailing_slash (cache_directory);
141143 cache_directory += " llama.cpp" ;
142144 }
You can’t perform that action at this time.
0 commit comments