CMake + MSVC: '_setmode' undefined
Brought to you by:
sobukus
in libout123/wav.c
:
#ifdef WIN32 _setmode(STDOUT_FILENO, _O_BINARY); #endif
produces warning:
D:\source\repos\libmpg123\src\libout123\wav.c(174): warning C4013: '_setmode' undefined; assuming extern returning int
Forgotten header is <io.h>
, see https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/setmode?view=msvc-160.
This is MSVC-only, right? Mingw seems to just offer this one with some other standard header.
I added an include for that in src/compat/compat.h. Warning is hopefully gone.
fixed in 1.28.0