>> __cdecl comes from Windows. See >> https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/qsort >
And actually, that whole cdecl thing only to satisfy windows is overzealous, i.e. you only need to satisfy MSVC / x86, i.e. can be simplified to an #if defined(_MSC_VER) && defined(_M_IX86) and even that shouldn't have been necessary because the windows msvc (and mingw which follows msvc) default calling convention is cdecl already.