musl libc doesn't support the newer (non blocking) name resolve API calls yet
I try to compile the latest version of mysql-connector-cpp in docker alpine 3.13.5 and it failed with:
/usr/src/mysql-connector-cpp/cdk/foundation/socket_detail.cc: In function 'std::forward_list<cdk::foundation::connection::detail::Srv_host_detail> cdk::foundation::connection::detail::srv_list(const string&)': /usr/src/mysql-connector-cpp/cdk/foundation/socket_detail.cc:1097:3: error: 'res_ninit' was not declared in this scope; did you mean 'res_init'? 1097 | res_ninit(&state); | ^~~~~~~~~ | res_init /usr/src/mysql-connector-cpp/cdk/foundation/socket_detail.cc:1107:13: error: 'res_nsearch' was not declared in this scope; did you mean 'res_search'? 1107 | int res = res_nsearch(&state, hostname.c_str(), ns_c_in, ns_t_srv, query_buffer, sizeof (query_buffer) ); | ^~~~~~~~~~~ | res_search /usr/src/mysql-connector-cpp/cdk/foundation/socket_detail.cc:1143:3: error: 'res_nclose' was not declared in this scope 1143 | res_nclose(&state); | ^~~~~~~~~~ make: *** [cdk/foundation/CMakeFiles/cdk_foundation.dir/build.make:147: cdk/foundation/CMakeFiles/cdk_foundation.dir/socket_detail.cc.o] Error 1 make: *** [CMakeFiles/Makefile2:1084: cdk/foundation/CMakeFiles/cdk_foundation.dir/all] Error 2 make: *** [Makefile:149: all] Error 2
It seems that the musl-libc doesn't support the newer (non blocking) name resolve API calls yet.