Boost logo

Boost-Commit :

From: chris_at_[hidden]
Date: 2007-10-29 09:08:33


Author: chris_kohlhoff
Date: 2007-10-29 09:08:32 EDT (Mon, 29 Oct 2007)
New Revision: 40549
URL: http://svn.boost.org/trac/boost/changeset/40549

Log:
HP-UX fails to declare if_nametoindex as extern "C". Added a declaration
for it with correct linkage to avoid a linker error.

Text files modified:
   trunk/libs/asio/test/ip/multicast.cpp | 6 ++++++
   1 files changed, 6 insertions(+), 0 deletions(-)

Modified: trunk/libs/asio/test/ip/multicast.cpp
==============================================================================
--- trunk/libs/asio/test/ip/multicast.cpp (original)
+++ trunk/libs/asio/test/ip/multicast.cpp 2007-10-29 09:08:32 EDT (Mon, 29 Oct 2007)
@@ -104,6 +104,12 @@
 
 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()
 {
   using namespace boost::asio;


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk