Boost C++ Libraries: Ticket #6161: SunOS: bad putenv declaration https://svn.boost.org/trac10/ticket/6161 <p> Boost 1.48.0 doesn't compile on SunOS 5.10 with the following error: </p> <p> sun.compile.c++ /boost-1.48.0.0/object-optimize/SunOS-5.10-i386/build-boost-test/boost/bin.v2/libs/test/build/sun/release/link-static/stdlib-sun-stlport/threading-multi/unit_test_parameters.o "/usr/include/stdlib.h", line 120: Error: putenv(char*) was declared before with a different language. </p> <p> The following patch does fix the problem: </p> <p> Index: boost/test/utils/runtime/config.hpp =================================================================== --- boost/test/utils/runtime/config.hpp (revision 182) +++ boost/test/utils/runtime/config.hpp (working copy) @@ -45,7 +45,9 @@ </p> <blockquote> <p> #endif </p> </blockquote> <p> </p> <blockquote> <p> #ifdef <span class="underline">SUNPRO_CC </span></p> </blockquote> <p> -extern int putenv(char*); +extern "C" { + extern int putenv(char*); +} </p> <blockquote> <p> #endif </p> </blockquote> <p> </p> <blockquote> <p> namespace boost { </p> </blockquote> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/6161 Trac 1.4.3 fguiliani@… Tue, 22 Nov 2011 11:42:52 GMT attachment set https://svn.boost.org/trac10/ticket/6161 https://svn.boost.org/trac10/ticket/6161 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">putenv_issue_on_sunos.patch</span> </li> </ul> <p> fix for the issue </p> Ticket anonymous Tue, 22 Nov 2011 11:43:40 GMT component changed; owner set https://svn.boost.org/trac10/ticket/6161#comment:1 https://svn.boost.org/trac10/ticket/6161#comment:1 <ul> <li><strong>owner</strong> set to <span class="trac-author">Gennadiy Rozental</span> </li> <li><strong>component</strong> <span class="trac-field-old">Building Boost</span> → <span class="trac-field-new">test</span> </li> </ul> Ticket anonymous Tue, 22 Nov 2011 11:45:41 GMT <link>https://svn.boost.org/trac10/ticket/6161#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6161#comment:2</guid> <description> <p> Added the patch as an attachment as the inlined version didn't show correctly. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Gennadiy Rozental</dc:creator> <pubDate>Mon, 05 Nov 2012 10:00:08 GMT</pubDate> <title>owner changed https://svn.boost.org/trac10/ticket/6161#comment:3 https://svn.boost.org/trac10/ticket/6161#comment:3 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Gennadiy Rozental</span> to <span class="trac-author">Steven Watanabe</span> </li> </ul> <p> The same as the other one </p> Ticket Raffi Enficiaud Sat, 28 Mar 2015 00:53:44 GMT owner, status changed https://svn.boost.org/trac10/ticket/6161#comment:4 https://svn.boost.org/trac10/ticket/6161#comment:4 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Steven Watanabe</span> to <span class="trac-author">Raffi Enficiaud</span> </li> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> </ul> <p> Duplicate of <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/6766" title="#6766: Bugs: incorrect declaration for putenv in config.hpp (closed: fixed)">#6766</a> </p> Ticket Raffi Enficiaud Tue, 07 Jul 2015 07:43:38 GMT status, milestone changed; resolution set https://svn.boost.org/trac10/ticket/6161#comment:5 https://svn.boost.org/trac10/ticket/6161#comment:5 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> <li><strong>milestone</strong> <span class="trac-field-old">To Be Determined</span> → <span class="trac-field-new">Boost 1.59.0</span> </li> </ul> Ticket