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() {
126
126
if (getenv (" LLAMA_CACHE" )) {
127
127
cache_directory = std::getenv (" LLAMA_CACHE" );
128
128
} else {
129
- #ifdef __linux__
129
+ #if defined( __linux__) || defined(__FreeBSD__)
130
130
if (std::getenv (" XDG_CACHE_HOME" )) {
131
131
cache_directory = std::getenv (" XDG_CACHE_HOME" );
132
132
} else {
@@ -136,7 +136,9 @@ static std::string fs_get_cache_directory() {
136
136
cache_directory = std::getenv (" HOME" ) + std::string (" /Library/Caches/" );
137
137
#elif defined(_WIN32)
138
138
cache_directory = std::getenv (" LOCALAPPDATA" );
139
- #endif // __linux__
139
+ #else
140
+ # error Unknown architecture
141
+ #endif
140
142
cache_directory = ensure_trailing_slash (cache_directory);
141
143
cache_directory += " llama.cpp" ;
142
144
}
You can’t perform that action at this time.
0 commit comments