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