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() {
830
830
if (getenv (" LLAMA_CACHE" )) {
831
831
cache_directory = std::getenv (" LLAMA_CACHE" );
832
832
} else {
833
- #ifdef __linux__
833
+ #if defined( __linux__) || defined(__FreeBSD__)
834
834
if (std::getenv (" XDG_CACHE_HOME" )) {
835
835
cache_directory = std::getenv (" XDG_CACHE_HOME" );
836
836
} else {
@@ -840,7 +840,9 @@ std::string fs_get_cache_directory() {
840
840
cache_directory = std::getenv (" HOME" ) + std::string (" /Library/Caches/" );
841
841
#elif defined(_WIN32)
842
842
cache_directory = std::getenv (" LOCALAPPDATA" );
843
- #endif // __linux__
843
+ #else
844
+ # error Unknown architecture
845
+ #endif
844
846
cache_directory = ensure_trailing_slash (cache_directory);
845
847
cache_directory += " llama.cpp" ;
846
848
}
You can’t perform that action at this time.
0 commit comments