Boost C++ Libraries: Ticket #2593: asio missing IPPROTO_IPV6 for win2k and older targets https://svn.boost.org/trac10/ticket/2593 <p> 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: </p> <p> boost/asio/detail/socket_ops.hpp(407) : error C2065: 'IPPROTO_IPV6' : undeclared identifier </p> <p> Since this is the only header which references IPPROTO_IPV6, a possible workaround would be to stick at the top of the header: </p> <p> <em> When target is Windows 2000 or earlier, Microsoft's ws2def.h does not </em> enumerate IPPROTO_IPV6. </p> <table class="wiki"> <tr>#if defined(BOOST_WINDOWS) <td> defined(<span class="underline">CYGWIN</span>) </td></tr></table> <p> # if defined(_WIN32_WINNT) &amp;&amp; (_WIN32_WINNT &lt;= 0x0500) # define IPPROTO_IPV6 41 # endif <em> _WIN32_WINNT </p> <table class="wiki"> <tr>#endif </em> defined(BOOST_WINDOWS) <td> defined(<span class="underline">CYGWIN</span>) </td></tr></table> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/2593 Trac 1.4.3 Joey Liaw <joeyliaw@…> Tue, 16 Dec 2008 05:09:52 GMT <link>https://svn.boost.org/trac10/ticket/2593#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2593#comment:1</guid> <description> <p> This is what I get for not previewing the formatting. </p> <pre class="wiki">// 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) &amp;&amp; (_WIN32_WINNT &lt;= 0x0500) # define IPPROTO_IPV6 41 # endif // _WIN32_WINNT #endif // defined(BOOST_WINDOWS) || defined(__CYGWIN__) </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>chris_kohlhoff</dc:creator> <pubDate>Thu, 18 Mar 2010 04:00:00 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/2593#comment:2 https://svn.boost.org/trac10/ticket/2593#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">invalid</span> </li> </ul> <p> I cannot reproduce any problem using the v6.0A Windows SDK (which I presume is the Vista SDK"). When I define _WIN32_WINNT to 0x500, the existing emulation in boost/asio/detail/old_win_sdk_compat.hpp is used. </p> Ticket