<p>Max has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/11719">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">Streamline glibc version check<br><br>* use macro for version check<br>* report glibc version upon detection<br><br>Change-Id: Ia54f0b7a861f955be65bb0cf06eb10af9372d062<br>---<br>M src/gsm/gsm_utils.c<br>1 file changed, 5 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/19/11719/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/gsm/gsm_utils.c b/src/gsm/gsm_utils.c</span><br><span>index 7e6c794..be35cd4 100644</span><br><span>--- a/src/gsm/gsm_utils.c</span><br><span>+++ b/src/gsm/gsm_utils.c</span><br><span>@@ -95,11 +95,12 @@</span><br><span> #include <inttypes.h></span><br><span> #include <time.h></span><br><span> #include <unistd.h></span><br><span style="color: hsl(120, 100%, 40%);">+#include <features.h></span><br><span> </span><br><span> #include "../../config.h"</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-/* FIXME: this can be removed once we bump glibc requirements to 2.25: */</span><br><span style="color: hsl(0, 100%, 40%);">-#if defined(__GLIBC__) && (__GLIBC__ >= 2) && (__GLIBC_MINOR__ >= 25)</span><br><span style="color: hsl(120, 100%, 40%);">+/* FIXME: this can be removed once we bump glibc requirements to 2.25:*/</span><br><span style="color: hsl(120, 100%, 40%);">+#if __GNUC_PREREQ (2,25)</span><br><span> #include <sys/random.h></span><br><span> #elif HAVE_DECL_SYS_GETRANDOM</span><br><span> #include <sys/syscall.h></span><br><span>@@ -131,6 +132,8 @@</span><br><span>         if (!gnutls_check_version("3.3.0"))</span><br><span>                gnutls_global_deinit();</span><br><span> }</span><br><span style="color: hsl(120, 100%, 40%);">+#else</span><br><span style="color: hsl(120, 100%, 40%);">+#pragma message ("glibc " OSMO_STRINGIFY_VAL(__GLIBC__) "." OSMO_STRINGIFY_VAL(__GLIBC_MINOR__) " random detected")</span><br><span> #endif</span><br><span> </span><br><span> /* ETSI GSM 03.38 6.2.1 and 6.2.1.1 default alphabet</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/11719">change 11719</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/11719"/><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: Ia54f0b7a861f955be65bb0cf06eb10af9372d062 </div>
<div style="display:none"> Gerrit-Change-Number: 11719 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Max <msuraev@sysmocom.de> </div>