Skip to content

Commit 964a345

Browse files
committed
cont
ggml-ci
1 parent c98eb63 commit 964a345

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/llama-mmap.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,9 +244,13 @@ size_t llama_file::size() const { return pimpl->size; }
244244
int llama_file::file_id() const {
245245
#ifdef _WIN32
246246
return _fileno(pimpl->fp);
247+
#else
248+
#if defined(fileno)
249+
return fileno(pimpl->fp);
247250
#else
248251
return ::fileno(pimpl->fp);
249252
#endif
253+
#endif
250254
}
251255

252256
void llama_file::seek(size_t offset, int whence) const { pimpl->seek(offset, whence); }

0 commit comments

Comments
 (0)