From 7874ded17f98686cae53d88824726f1eb4e857b4 Mon Sep 17 00:00:00 2001 From: Matthias Moulin Date: Sun, 7 Apr 2024 12:50:27 +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. --- src/os.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/os.cc b/src/os.cc index 70a4a04c4d3d..2ba9bc8ae1b6 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