<p>Pau Espin Pedrol has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/12210">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">timer: Fix clockid_t undefined on MacOS < 10.12<br><br>Change-Id: If466a64bd44dcb8ae8a9b7f82bc9c9435ba3e640<br>---<br>M include/osmocom/core/timer.h<br>M include/osmocom/core/timer_compat.h<br>2 files changed, 5 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/10/12210/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/include/osmocom/core/timer.h b/include/osmocom/core/timer.h</span><br><span>index caf4c67..1979766 100644</span><br><span>--- a/include/osmocom/core/timer.h</span><br><span>+++ b/include/osmocom/core/timer.h</span><br><span>@@ -45,6 +45,7 @@</span><br><span> </span><br><span> #include <osmocom/core/linuxlist.h></span><br><span> #include <osmocom/core/linuxrbtree.h></span><br><span style="color: hsl(120, 100%, 40%);">+#include <osmocom/core/timer_compat.h></span><br><span> </span><br><span> /* convert absolute time (in seconds) to elapsed days/hours/minutes */</span><br><span> #define OSMO_SEC2MIN(sec) ((sec % (60 * 60)) / 60)</span><br><span>diff --git a/include/osmocom/core/timer_compat.h b/include/osmocom/core/timer_compat.h</span><br><span>index 8fdd0a0..916f568 100644</span><br><span>--- a/include/osmocom/core/timer_compat.h</span><br><span>+++ b/include/osmocom/core/timer_compat.h</span><br><span>@@ -27,6 +27,10 @@</span><br><span> </span><br><span> #pragma once</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+/* MacOS < 10.12 Sierra does not define clockid_t */</span><br><span style="color: hsl(120, 100%, 40%);">+#if defined(__APPLE__) && (!defined(__DARWIN_C_LEVEL) || __DARWIN_C_LEVEL < 199309L)</span><br><span style="color: hsl(120, 100%, 40%);">+typedef int clockid_t;</span><br><span style="color: hsl(120, 100%, 40%);">+#endif</span><br><span> </span><br><span> /* Convenience macros for operations on timevals.</span><br><span>    NOTE: `timercmp' does not work for >= or <=.  */</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/12210">change 12210</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/12210"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: libosmocore </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: If466a64bd44dcb8ae8a9b7f82bc9c9435ba3e640 </div>
<div style="display:none"> Gerrit-Change-Number: 12210 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Pau Espin Pedrol <pespin@sysmocom.de> </div>