<p>N A has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/17362">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">Add FreeBSD compiler flag<br><br>FreeBSD currently maintains ports to get<br>Asterisk to compile on FreeBSD. However,<br>some of these can be trivially incorporated<br>into Asterisk to streamline the process for<br>FreeBSD users.<br><br>ASTERISK-29739<br><br>Change-Id: Ice4f615a9ea4662dd6d83594f0c9989e1b5251c0<br>---<br>M channels/chan_dahdi.c<br>M main/http.c<br>2 files changed, 19 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/62/17362/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c</span><br><span>index 74c76f7..056eaa5 100644</span><br><span>--- a/channels/chan_dahdi.c</span><br><span>+++ b/channels/chan_dahdi.c</span><br><span>@@ -4653,6 +4653,9 @@</span><br><span> return;</span><br><span> }</span><br><span> if (p->echocancel.head.tap_length) {</span><br><span style="color: hsl(120, 100%, 40%);">+#if defined(FREEBSD)</span><br><span style="color: hsl(120, 100%, 40%);">+ struct dahdi_echocanparams *pecp;</span><br><span style="color: hsl(120, 100%, 40%);">+#endif /* defined(FREEBSD) */</span><br><span> #if defined(HAVE_PRI) || defined(HAVE_SS7)</span><br><span> switch (p->sig) {</span><br><span> #if defined(HAVE_PRI)</span><br><span>@@ -4672,7 +4675,12 @@</span><br><span> {</span><br><span> int x = 1;</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+#if defined(FREEBSD)</span><br><span style="color: hsl(120, 100%, 40%);">+ pecp = &p->echocancel.head;</span><br><span style="color: hsl(120, 100%, 40%);">+ res = ioctl(p->subs[SUB_REAL].dfd, DAHDI_ECHOCANCEL_PARAMS, &pecp);</span><br><span style="color: hsl(120, 100%, 40%);">+#else</span><br><span> res = ioctl(p->subs[SUB_REAL].dfd, DAHDI_AUDIOMODE, &x);</span><br><span style="color: hsl(120, 100%, 40%);">+#endif /* defined(FREEBSD) */</span><br><span> if (res)</span><br><span> ast_log(LOG_WARNING,</span><br><span> "Unable to enable audio mode on channel %d (%s)\n",</span><br><span>@@ -4717,8 +4725,15 @@</span><br><span> </span><br><span> if (p->echocanon) {</span><br><span> struct dahdi_echocanparams ecp = { .tap_length = 0 };</span><br><span style="color: hsl(120, 100%, 40%);">+#if defined(FREEBSD)</span><br><span style="color: hsl(120, 100%, 40%);">+ struct dahdi_echocanparams *pecp = &ecp;</span><br><span style="color: hsl(120, 100%, 40%);">+#endif /* defined(FREEBSD) */</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+#if defined(FREEBSD)</span><br><span style="color: hsl(120, 100%, 40%);">+ res = ioctl(p->subs[SUB_REAL].dfd, DAHDI_ECHOCANCEL_PARAMS, &pecp);</span><br><span style="color: hsl(120, 100%, 40%);">+#else</span><br><span> res = ioctl(p->subs[SUB_REAL].dfd, DAHDI_ECHOCANCEL_PARAMS, &ecp);</span><br><span style="color: hsl(120, 100%, 40%);">+#endif /* defined(FREEBSD) */</span><br><span> </span><br><span> if (res)</span><br><span> ast_log(LOG_WARNING, "Unable to disable echo cancellation on channel %d: %s\n", p->channel, strerror(errno));</span><br><span>diff --git a/main/http.c b/main/http.c</span><br><span>index a0f15f43..0e1b779 100644</span><br><span>--- a/main/http.c</span><br><span>+++ b/main/http.c</span><br><span>@@ -2086,7 +2086,11 @@</span><br><span> struct http_uri_redirect *redirect;</span><br><span> struct ast_flags config_flags = { reload ? CONFIG_FLAG_FILEUNCHANGED : 0 };</span><br><span> uint32_t bindport = DEFAULT_PORT;</span><br><span style="color: hsl(120, 100%, 40%);">+#if defined(FREEBSD)</span><br><span style="color: hsl(120, 100%, 40%);">+ struct ast_sockaddr *addrs = NULL;</span><br><span style="color: hsl(120, 100%, 40%);">+#else</span><br><span> RAII_VAR(struct ast_sockaddr *, addrs, NULL, ast_free);</span><br><span style="color: hsl(120, 100%, 40%);">+#endif /* defined(FREEBSD) */</span><br><span> int num_addrs = 0;</span><br><span> int http_tls_was_enabled = 0;</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/17362">change 17362</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/+/17362"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Ice4f615a9ea4662dd6d83594f0c9989e1b5251c0 </div>
<div style="display:none"> Gerrit-Change-Number: 17362 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: N A <mail@interlinked.x10host.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>