mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-26 18:42:41 +01:00
Add extern "C" around <net/if.h> on HPUX platform.
On hpux platform, functions(such as `if_nametoindex` and `if_indextoname`) in <net/if.h> doesn't declare with `extern "C"`. Fix this bug by add `extern "C"`. See http://www.boost.org/doc/libs/1_40_0/boost/asio/detail/socket_ops.hpp
This commit is contained in:
@@ -179,6 +179,11 @@
|
|||||||
extern unsigned int if_nametoindex (__const char *__ifname) __THROW;
|
extern unsigned int if_nametoindex (__const char *__ifname) __THROW;
|
||||||
extern char *if_indextoname (unsigned int __ifindex, char *__ifname) __THROW;
|
extern char *if_indextoname (unsigned int __ifindex, char *__ifname) __THROW;
|
||||||
}
|
}
|
||||||
|
#elif (POCO_OS == POCO_OS_HPUX)
|
||||||
|
extern "C"
|
||||||
|
{
|
||||||
|
#include <net/if.h>
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
#include <net/if.h>
|
#include <net/if.h>
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user