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() {
850
850
if (getenv (" LLAMA_CACHE" )) {
851
851
cache_directory = std::getenv (" LLAMA_CACHE" );
852
852
} else {
853
- #ifdef __linux__
853
+ #if defined( __linux__) || defined(__FreeBSD__)
854
854
if (std::getenv (" XDG_CACHE_HOME" )) {
855
855
cache_directory = std::getenv (" XDG_CACHE_HOME" );
856
856
} else {
@@ -860,7 +860,9 @@ std::string fs_get_cache_directory() {
860
860
cache_directory = std::getenv (" HOME" ) + std::string (" /Library/Caches/" );
861
861
#elif defined(_WIN32)
862
862
cache_directory = std::getenv (" LOCALAPPDATA" );
863
- #endif // __linux__
863
+ #else
864
+ # error Unknown architecture
865
+ #endif
864
866
cache_directory = ensure_trailing_slash (cache_directory);
865
867
cache_directory += " llama.cpp" ;
866
868
}
You can’t perform that action at this time.
0 commit comments