Define setlinebuf for MSVC

According to `setbuf(3)`, `setlinebuf` is exactly equivalent to
`setvbuf(stream, NULL, _IOLBF, 0)`.
This commit is contained in:
David Coles 2024-06-25 17:11:20 -07:00 committed by Wim Taymans
parent 5d7624001d
commit 9ae9009edf

View file

@ -22,6 +22,10 @@
#if defined(__FreeBSD__) || defined(__MidnightBSD__)
#define CLOCK_MONOTONIC_RAW CLOCK_MONOTONIC
#elif defined(_MSC_VER)
static inline void setlinebuf(FILE* stream) {
setvbuf(stream, NULL, _IOLBF, 0);
}
#endif
#undef SPA_LOG_TOPIC_DEFAULT