Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
CMake: use check_symbol_exists also for inet_pton #4808
It doesn't make much sense to only check if the function can be linked
Also, move the definition of
Tested with Visual Studio 2019 and current MinGW-w64.
It doesn't make much sense to only check if the function can be linked when it's not declared in any header and that is treated as an error. With the correct target Windows version set, the function is declared in ws2tcpip.h and the comment above the modified block is invalid. Also, move the definition of `_WIN32_WINNT` up to before all symbol availability checks so that we don't have to care which ones must be done after it. Tested with Visual Studio 2019 and current MinGW-w64. Closes