HP-UX fails to declare if_nametoindex as extern "C". Added a declaration

for it with correct linkage to avoid a linker error.
This commit is contained in:
chris_kohlhoff 2007-10-29 12:46:17 +00:00
parent 502ad4582b
commit bbf3a233d7

View File

@ -104,6 +104,12 @@ void test()
namespace ip_multicast_runtime { namespace ip_multicast_runtime {
#if defined(__hpux)
// HP-UX doesn't declare this function extern "C", so it is declared again here
// to avoid a linker errors about an undefined symbol.
extern "C" unsigned int if_nametoindex(const char*);
#endif // defined(__hpux)
void test() void test()
{ {
using namespace asio; using namespace asio;