Skip to content

Commit

Permalink
fixed linux build error
Browse files Browse the repository at this point in the history
  • Loading branch information
LostRuins committed Aug 24, 2023
1 parent 661bede commit 4c4e435
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion otherarch/llama-util.h
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion otherarch/llama_v2-util.h
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 4c4e435

Please sign in to comment.