[Asterisk-code-review] Add FreeBSD compiler flag (asterisk[master])
N A
asteriskteam at digium.com
Sun Nov 14 11:47:45 CST 2021
N A has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/17362 )
Change subject: Add FreeBSD compiler flag
......................................................................
Add FreeBSD compiler flag
FreeBSD currently maintains ports to get
Asterisk to compile on FreeBSD. However,
some of these can be trivially incorporated
into Asterisk to streamline the process for
FreeBSD users.
ASTERISK-29739
Change-Id: Ice4f615a9ea4662dd6d83594f0c9989e1b5251c0
---
M channels/chan_dahdi.c
M main/http.c
2 files changed, 19 insertions(+), 0 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/62/17362/1
diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c
index 74c76f7..056eaa5 100644
--- a/channels/chan_dahdi.c
+++ b/channels/chan_dahdi.c
@@ -4653,6 +4653,9 @@
return;
}
if (p->echocancel.head.tap_length) {
+#if defined(FREEBSD)
+ struct dahdi_echocanparams *pecp;
+#endif /* defined(FREEBSD) */
#if defined(HAVE_PRI) || defined(HAVE_SS7)
switch (p->sig) {
#if defined(HAVE_PRI)
@@ -4672,7 +4675,12 @@
{
int x = 1;
+#if defined(FREEBSD)
+ pecp = &p->echocancel.head;
+ res = ioctl(p->subs[SUB_REAL].dfd, DAHDI_ECHOCANCEL_PARAMS, &pecp);
+#else
res = ioctl(p->subs[SUB_REAL].dfd, DAHDI_AUDIOMODE, &x);
+#endif /* defined(FREEBSD) */
if (res)
ast_log(LOG_WARNING,
"Unable to enable audio mode on channel %d (%s)\n",
@@ -4717,8 +4725,15 @@
if (p->echocanon) {
struct dahdi_echocanparams ecp = { .tap_length = 0 };
+#if defined(FREEBSD)
+ struct dahdi_echocanparams *pecp = &ecp;
+#endif /* defined(FREEBSD) */
+#if defined(FREEBSD)
+ res = ioctl(p->subs[SUB_REAL].dfd, DAHDI_ECHOCANCEL_PARAMS, &pecp);
+#else
res = ioctl(p->subs[SUB_REAL].dfd, DAHDI_ECHOCANCEL_PARAMS, &ecp);
+#endif /* defined(FREEBSD) */
if (res)
ast_log(LOG_WARNING, "Unable to disable echo cancellation on channel %d: %s\n", p->channel, strerror(errno));
diff --git a/main/http.c b/main/http.c
index a0f15f43..0e1b779 100644
--- a/main/http.c
+++ b/main/http.c
@@ -2086,7 +2086,11 @@
struct http_uri_redirect *redirect;
struct ast_flags config_flags = { reload ? CONFIG_FLAG_FILEUNCHANGED : 0 };
uint32_t bindport = DEFAULT_PORT;
+#if defined(FREEBSD)
+ struct ast_sockaddr *addrs = NULL;
+#else
RAII_VAR(struct ast_sockaddr *, addrs, NULL, ast_free);
+#endif /* defined(FREEBSD) */
int num_addrs = 0;
int http_tls_was_enabled = 0;
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/17362
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: Ice4f615a9ea4662dd6d83594f0c9989e1b5251c0
Gerrit-Change-Number: 17362
Gerrit-PatchSet: 1
Gerrit-Owner: N A <mail at interlinked.x10host.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20211114/29fc8af0/attachment.html>
More information about the asterisk-code-review
mailing list