<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - use of clock_gettime() blocks build of xray on macOS 10.11 and less"
   href="https://bugs.llvm.org/show_bug.cgi?id=38959">38959</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>use of clock_gettime() blocks build of xray on macOS 10.11 and less
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>XRay
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Macintosh
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>MacOS X
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Runtime
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>dberris@google.com
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>ken.cunningham.webuse@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>clock_gettime() was added in macOS 10.12.

<<a href="https://stackoverflow.com/questions/5167269/clock-gettime-alternative-in-mac-os-x">https://stackoverflow.com/questions/5167269/clock-gettime-alternative-in-mac-os-x</a>>

clock_gettime() is used in several instances in the xray runtime library, and
CLOCK_REALTIME is used but undefined on 10.11 and earlier, and so the build
fails on systems without this function and definition.

A possible replacement function is used in MacPorts for a similar failure in
other software:

<<a href="https://github.com/macports/macports-ports/blob/master/graphics/cogl/files/patch-clock_gettime.diff">https://github.com/macports/macports-ports/blob/master/graphics/cogl/files/patch-clock_gettime.diff</a>>

Another clock_gettime() replacement function with an MIT license is noted here
<<a href="https://gist.github.com/alfwatt/3588c5aa1f7a1ef7a3bb">https://gist.github.com/alfwatt/3588c5aa1f7a1ef7a3bb</a>></pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>