fixed linux build error

This commit is contained in:
Concedo 2023-08-24 22:12:56 +08:00
parent 661bede62f
commit 4c4e4358ed
2 changed files with 2 additions and 2 deletions

View file

@ -223,7 +223,7 @@ struct llama_v3_mmap {
#endif
addr = mmap(NULL, file->size, PROT_READ, flags, fd, 0);
if (addr == MAP_FAILED) {
throw std::runtime_error(format("mmap failed: %s", strerror(errno)));
throw std::runtime_error(format_old("mmap failed: %s", strerror(errno)));
}
if (prefetch > 0) {

View file

@ -171,7 +171,7 @@ struct llama_v2_mmap {
#endif
addr = mmap(NULL, file->size, PROT_READ, flags, fd, 0);
if (addr == MAP_FAILED) {
throw std::runtime_error(format("mmap failed: %s", strerror(errno)));
throw std::runtime_error(format_old("mmap failed: %s", strerror(errno)));
}
if (prefetch) {