<p>George Joseph <strong>submitted</strong> this change.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/13972">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  George Joseph: Looks good to me, approved; Approved for Submit

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">Update main/backtrace.c to deal with changes in binutils 2.34.<br><br>binutils 2.34 merged this commit:<br><br>https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff;\<br>      h=fd3619828e94a24a92cddec42cbc0ab33352eeb4<br><br>Which effectively does things like:<br><br>-#define bfd_section_size(bfd, ptr) ((ptr)->size)<br>-#define bfd_get_section_size(ptr) ((ptr)->size)<br><br>+#define bfd_section_size(sec) ((sec)->size)<br><br>So in order to remain backwards compatible we need to detect this API<br>change, and adjust accordingly.  The simplest is to notice that the<br>bfd_get_section_size and bfd_get_section_vma MACROs are no longer<br>defined, and define then onto the new API.  The alternative is to litter<br>the code with a number of #ifdef #else #endif splatters right through<br>the code.<br><br>Change-Id: I3efe0f8e8f3e338d16fcbc2b26a505367b6e172f<br>---<br>M main/backtrace.c<br>1 file changed, 6 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/main/backtrace.c b/main/backtrace.c</span><br><span>index 2623d7f..1bc9bea 100644</span><br><span>--- a/main/backtrace.c</span><br><span>+++ b/main/backtrace.c</span><br><span>@@ -59,6 +59,12 @@</span><br><span> #if defined(HAVE_DLADDR) && defined(HAVE_BFD) && defined(BETTER_BACKTRACES)</span><br><span> #include <dlfcn.h></span><br><span> #include <bfd.h></span><br><span style="color: hsl(120, 100%, 40%);">+#ifndef bfd_get_section_size</span><br><span style="color: hsl(120, 100%, 40%);">+#define bfd_get_section_size(x) bfd_section_size(x)</span><br><span style="color: hsl(120, 100%, 40%);">+#endif</span><br><span style="color: hsl(120, 100%, 40%);">+#ifndef bfd_get_section_vma</span><br><span style="color: hsl(120, 100%, 40%);">+#define bfd_get_section_vma(x, y)       bfd_section_vma(y)</span><br><span style="color: hsl(120, 100%, 40%);">+#endif</span><br><span> #endif</span><br><span> </span><br><span> #include <pthread.h></span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/13972">change 13972</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.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.asterisk.org/c/asterisk/+/13972"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 17 </div>
<div style="display:none"> Gerrit-Change-Id: I3efe0f8e8f3e338d16fcbc2b26a505367b6e172f </div>
<div style="display:none"> Gerrit-Change-Number: 13972 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Jaco Kroon <jaco@uls.co.za> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>