Subject: [Boost-bugs] [Boost C++ Libraries] #2593: asio missing IPPROTO_IPV6 for win2k and older targets
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2008-12-16 05:08:00
#2593: asio missing IPPROTO_IPV6 for win2k and older targets
--------------------------------------------+-------------------------------
Reporter: Joey Liaw <joeyliaw_at_[hidden]> | Owner: chris_kohlhoff
Type: Bugs | Status: new
Milestone: Boost 1.38.0 | Component: asio
Version: Boost 1.37.0 | Severity: Problem
Keywords: IPPROTO_IPV6 |
--------------------------------------------+-------------------------------
When building against Vista SDK headers, if the windows version target
_WIN32_WINNT is defined to be 0x0500 (win2k) or less, IPPROTO_IPV6 is not
included in the enum in ws2def.h, giving the error:
boost/asio/detail/socket_ops.hpp(407) : error C2065: 'IPPROTO_IPV6' :
undeclared identifier
Since this is the only header which references IPPROTO_IPV6, a possible
workaround would be to stick at the top of the header:
// When target is Windows 2000 or earlier, Microsoft's ws2def.h does not
// enumerate IPPROTO_IPV6.
#if defined(BOOST_WINDOWS) || defined(__CYGWIN__)
# if defined(_WIN32_WINNT) && (_WIN32_WINNT <= 0x0500)
# define IPPROTO_IPV6 41
# endif // _WIN32_WINNT
#endif // defined(BOOST_WINDOWS) || defined(__CYGWIN__)
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/2593> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:49:59 UTC