fixed linux build error
This commit is contained in:
parent
661bede62f
commit
4c4e4358ed
2 changed files with 2 additions and 2 deletions
|
@ -223,7 +223,7 @@ struct llama_v3_mmap {
|
||||||
#endif
|
#endif
|
||||||
addr = mmap(NULL, file->size, PROT_READ, flags, fd, 0);
|
addr = mmap(NULL, file->size, PROT_READ, flags, fd, 0);
|
||||||
if (addr == MAP_FAILED) {
|
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) {
|
if (prefetch > 0) {
|
||||||
|
|
|
@ -171,7 +171,7 @@ struct llama_v2_mmap {
|
||||||
#endif
|
#endif
|
||||||
addr = mmap(NULL, file->size, PROT_READ, flags, fd, 0);
|
addr = mmap(NULL, file->size, PROT_READ, flags, fd, 0);
|
||||||
if (addr == MAP_FAILED) {
|
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) {
|
if (prefetch) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue