Boost C++ Libraries: Ticket #8435: Can't compile Chrono on HP-UX due to no CLOCK_REALTIME macro. https://svn.boost.org/trac10/ticket/8435 <p> We're trying to compile Chrono library on HP-UX 11i23, to be used with conjunction with threads. The compilation fails with </p> <pre class="wiki">#error &lt;time.h&gt; does not supply CLOCK_REALTIME </pre><p> This is due to the following code in system_clocks.hpp: </p> <pre class="wiki"># if defined( BOOST_CHRONO_POSIX_API ) # if ! defined(CLOCK_REALTIME) # error &lt;time.h&gt; does not supply CLOCK_REALTIME # endif # endif </pre><p> HP-UX provides CLOCK_REALTIME, although as an enum, not a macro, so the ifdef fails. This is true for version 11i23 and I suspect that also for other HP-UX versions (I cannot confirm this though, and it's hard to get any information on HP-UX through googling). </p> <p> I'm not sure what solution would be right here, but simple ifdef does not cut it. I sidestepped this issue by modyfying it to </p> <pre class="wiki"># if ! defined(CLOCK_REALTIME) || defined(__hpux) </pre><p> but it's more of a hack than a solution, especially since I'm not certain that every version of HP-UX supply CLOCK_REALTIME. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/8435 Trac 1.4.3 anonymous Sat, 13 Apr 2013 17:22:55 GMT <link>https://svn.boost.org/trac10/ticket/8435#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/8435#comment:1</guid> <description> <p> Of course didn't mean for the code to fail on all HP-UXes. :) This is the actual hack code: </p> <pre class="wiki"># if ! defined(CLOCK_REALTIME) &amp;&amp; ! defined(__hpux) </pre> </description> <category>Ticket</category> </item> <item> <author>konrad.zemek@…</author> <pubDate>Sat, 13 Apr 2013 17:24:08 GMT</pubDate> <title>summary changed https://svn.boost.org/trac10/ticket/8435#comment:2 https://svn.boost.org/trac10/ticket/8435#comment:2 <ul> <li><strong>summary</strong> <span class="trac-field-old">Can't compile Chrono on HP-UX due no CLOCK_REALTIME macro.</span> → <span class="trac-field-new">Can't compile Chrono on HP-UX due to no CLOCK_REALTIME macro.</span> </li> </ul> Ticket viboes Sun, 14 Apr 2013 13:18:03 GMT milestone changed https://svn.boost.org/trac10/ticket/8435#comment:3 https://svn.boost.org/trac10/ticket/8435#comment:3 <ul> <li><strong>milestone</strong> <span class="trac-field-old">To Be Determined</span> → <span class="trac-field-new">Boost 1.54.0</span> </li> </ul> <p> Committed revision <a class="changeset" href="https://svn.boost.org/trac10/changeset/83896" title="Chrono: Apply patch for #8435.">[83896]</a><a class="changeset" href="https://svn.boost.org/trac10/changeset/83899" title="Chrono: apply patch for #8435.">[83899]</a>. </p> Ticket viboes Sun, 14 Apr 2013 13:31:34 GMT status changed https://svn.boost.org/trac10/ticket/8435#comment:4 https://svn.boost.org/trac10/ticket/8435#comment:4 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> </ul> Ticket viboes Sun, 14 Apr 2013 21:32:53 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/8435#comment:5 https://svn.boost.org/trac10/ticket/8435#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> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/83905" title="Chrono: merge to fix #8435.">[83905]</a>) Chrono: merge to fix <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/8435" title="#8435: Bugs: Can't compile Chrono on HP-UX due to no CLOCK_REALTIME macro. (closed: fixed)">#8435</a>. </p> Ticket