When using the MSVC C runtime, fileno doesn't actually exist, use _fileno instead.

OLDNAMES.lib may not be linked if you use /NODEFAULTLIB.
Note: This uses `_MSC_VER` as a gate and not _WIN32 as MinGW apparently uses `fileno` and not `_fileno`.
This commit is contained in:
Clément Grégoire
2026-05-29 17:15:30 +02:00
parent 33905b2f15
commit e93ddd2aa7

View File

@@ -10,7 +10,9 @@
# include <inttypes.h>
# include <intrin.h>
# include "../common/TracyWinFamily.hpp"
# ifndef _MSC_VER
# if defined(_MSC_VER) // https://devblogs.microsoft.com/oldnewthing/20200730-00/?p=104021/
# define fileno _fileno
# else
# include <excpt.h>
# endif
#else