error: ‘res_ninit’ was not declared in this scope; did you mean ‘res_init’?

  alpine, c++

I am trying to install an application from its source code in the alpine it says there is no res_ninit, res_nsearch and res_nclose but we can see here that do exists in the Linux headers and I have already installed apk add linux-headers, how can I resolve this issue?

make install
Consolidate compiler generated dependencies of target save_linker_opts
[  2%] Built target save_linker_opts
[  2%] Built target build_protobuf
Consolidate compiler generated dependencies of target cdk_foundation
[  3%] Building CXX object cdk/foundation/CMakeFiles/cdk_foundation.dir/socket_detail.cc.o
/dep/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&)':
/dep/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
/dep/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
/dep/mysql-connector-cpp/cdk/foundation/socket_detail.cc:1143:3: error: 'res_nclose' was not declared in this scope
 1143 |   res_nclose(&state);
      |   ^~~~~~~~~~
make[2]: *** [cdk/foundation/CMakeFiles/cdk_foundation.dir/build.make:146: cdk/foundation/CMakeFiles/cdk_foundation.dir/socket_detail.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1061: cdk/foundation/CMakeFiles/cdk_foundation.dir/all] Error 2

Source: Windows Questions C++

LEAVE A COMMENT