From 964a345e61fd8f593112e7717a81d348cfc0ac82 Mon Sep 17 00:00:00 2001 From: Georgi Gerganov Date: Sat, 4 Jan 2025 16:46:47 +0200 Subject: [PATCH] cont ggml-ci --- src/llama-mmap.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/llama-mmap.cpp b/src/llama-mmap.cpp index 5be8c8a19..a8cb9439b 100644 --- a/src/llama-mmap.cpp +++ b/src/llama-mmap.cpp @@ -244,9 +244,13 @@ size_t llama_file::size() const { return pimpl->size; } int llama_file::file_id() const { #ifdef _WIN32 return _fileno(pimpl->fp); +#else +#if defined(fileno) + return fileno(pimpl->fp); #else return ::fileno(pimpl->fp); #endif +#endif } void llama_file::seek(size_t offset, int whence) const { pimpl->seek(offset, whence); }