From aa52eb765dec0eb67fab4b035a4a05b82346c8f5 Mon Sep 17 00:00:00 2001 From: Matthias Moulin Date: Thu, 11 Apr 2024 20:13:57 +0200 Subject: [PATCH] Resolved warning C4996: 'fileno': The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _fileno. (#3930) --- src/os.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/os.cc b/src/os.cc index 70a4a04c..2ba9bc8a 100644 --- a/src/os.cc +++ b/src/os.cc @@ -188,6 +188,8 @@ int buffered_file::descriptor() const { # undef fileno # endif int fd = FMT_POSIX_CALL(fileno(file_)); +#elif defined(_WIN32) + int fd = _fileno(file_); #else int fd = fileno(file_); #endif