Skip to content

Commit

Permalink
Resolved warning C4996: 'fileno': The POSIX name for this item is dep…
Browse files Browse the repository at this point in the history
…recated. Instead, use the ISO C and C++ conformant name: _fileno.
  • Loading branch information
matt77hias committed Apr 10, 2024
1 parent 116a9ce commit 6d8a0c3
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/os.cc
Original file line number Diff line number Diff line change
Expand Up @@ -183,11 +183,9 @@ void buffered_file::close() {

int buffered_file::descriptor() const {
#ifdef FMT_HAS_SYSTEM
// fileno is a macro on OpenBSD.
# ifdef fileno
# undef fileno
# endif
int fd = FMT_POSIX_CALL(fileno(file_));
#elif defined(_WIN32)
int fd = _fileno(file_);
#else
int fd = fileno(file_);
#endif
Expand Down

0 comments on commit 6d8a0c3

Please sign in to comment.