<p>Joshua Colp <strong>submitted</strong> this change.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/14041">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Joshua Colp: Looks good to me, approved; Approved for Submit
  Kevin Harwell: Looks good to me, but someone else must approve

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">netsock2: compile fixes.<br><br>This fixes ast_addressfamily_to_sockaddrsize to reference the<br>provided argument, and ast_sockaddr_from_sockaddr to not use the name of<br>a structure as argument.<br><br>Change-Id: Ibf5db469c47c3b4214edf8456326086174e8edd7<br>---<br>M include/asterisk/netsock2.h<br>1 file changed, 3 insertions(+), 3 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/include/asterisk/netsock2.h b/include/asterisk/netsock2.h</span><br><span>index f209352..937139f 100644</span><br><span>--- a/include/asterisk/netsock2.h</span><br><span>+++ b/include/asterisk/netsock2.h</span><br><span>@@ -792,7 +792,7 @@</span><br><span>  * \param family The AF_XXX value to determine the size of</span><br><span>  * \return Size of the applicable struct sockaddr.</span><br><span>  */</span><br><span style="color: hsl(0, 100%, 40%);">-#define ast_addressfamily_to_sockaddrsize(family) _ast_addressfamily_to_sockaddrsize(addr, __FILE__, __LINE__, __PRETTY_FUNCTION__)</span><br><span style="color: hsl(120, 100%, 40%);">+#define ast_addressfamily_to_sockaddrsize(family) _ast_addressfamily_to_sockaddrsize(family, __FILE__, __LINE__, __PRETTY_FUNCTION__)</span><br><span> static inline int _ast_addressfamily_to_sockaddrsize(int af, const char *file, int line, const char *func)</span><br><span> {</span><br><span>   switch (af) {</span><br><span>@@ -818,10 +818,10 @@</span><br><span>  * You can check for failure with ast_sockaddr_isnull.</span><br><span>  *</span><br><span>  * \param[out] addr The address of the ast_sockaddr to store into</span><br><span style="color: hsl(0, 100%, 40%);">- * \param sockaddr The sockaddr structure (sockaddr_in or sockaddr_in6) to convert</span><br><span style="color: hsl(120, 100%, 40%);">+ * \param sa The sockaddr structure (sockaddr_in or sockaddr_in6) to convert</span><br><span>  * \return Nothing</span><br><span>  */</span><br><span style="color: hsl(0, 100%, 40%);">-#define ast_sockaddr_from_sockaddr(addr,sockaddr)        ast_sockaddr_copy_sockaddr(addr, sockaddr, ast_addressfamily_to_sockaddrsize(((const struct sockaddr*)(sockaddr))->sa_family))</span><br><span style="color: hsl(120, 100%, 40%);">+#define ast_sockaddr_from_sockaddr(addr,sa)  ast_sockaddr_copy_sockaddr(addr, sa, ast_addressfamily_to_sockaddrsize(((const struct sockaddr*)(sa))->sa_family))</span><br><span> </span><br><span> /*@}*/</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/14041">change 14041</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/+/14041"/><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: Ibf5db469c47c3b4214edf8456326086174e8edd7 </div>
<div style="display:none"> Gerrit-Change-Number: 14041 </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: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-Reviewer: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>