We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When I try to build mdns_cpp on Windows with MSYS2/MINGW it fails with the following output:
mdns_cpp
$ cmake --build . [ 10%] Building CXX object CMakeFiles/mdns_cpp.dir/src/logger.cpp.obj [ 20%] Building CXX object CMakeFiles/mdns_cpp.dir/src/mdns.cpp.obj C:\msys64\home\david\projects\mdns_cpp-master\src\mdns.cpp: In member function 'int mdns_cpp::mDNS::openServiceSockets(int*, int)': C:\msys64\home\david\projects\mdns_cpp-master\src\mdns.cpp:38:26: error: 'in4addr_any' was not declared in this scope; did you mean 'in6addr_any'? 38 | sock_addr.sin_addr = in4addr_any; | ^~~~~~~~~~~ | in6addr_any mingw32-make[2]: *** [CMakeFiles\mdns_cpp.dir\build.make:91: CMakeFiles/mdns_cpp.dir/src/mdns.cpp.obj] Error 1 mingw32-make[1]: *** [CMakeFiles\Makefile2:88: CMakeFiles/mdns_cpp.dir/all] Error 2 mingw32-make: *** [Makefile:135: all] Error 2
The following patch removed the error and the mdns_cpp build succeeded. And the example programs seem to work as expected.
--- mdns.cpp.original 2022-09-07 14:22:48.000000000 +0800 +++ mdns.cpp 2023-08-10 21:23:03.502663800 +0800 @@ -35,7 +35,7 @@ sockaddr_in sock_addr{}; sock_addr.sin_family = AF_INET; #ifdef _WIN32 - sock_addr.sin_addr = in4addr_any; + sock_addr.sin_addr.s_addr = INADDR_ANY; #else sock_addr.sin_addr.s_addr = INADDR_ANY; #endif
The text was updated successfully, but these errors were encountered:
No branches or pull requests
When I try to build
mdns_cpp
on Windows with MSYS2/MINGW it fails with the following output:The following patch removed the error and the
mdns_cpp
build succeeded. And the example programs seem to work as expected.The text was updated successfully, but these errors were encountered: