<p>Jenkins2 <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/8433">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  George Joseph: Looks good to me, but someone else must approve
  Joshua Colp: Looks good to me, approved
  Jenkins2: Approved for Submit

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">BuildSystem: Enable Advanced Linux Sound Architecture (ALSA) in NetBSD.<br><br>In the script ./configure, AST_EXT_LIB_CHECK checks for external libraries. Some<br>libraries do not specify all their dependencies and require additional shared<br>libraries. In AST_EXT_LIB_CHECK, this is the fifth parameter. However, if a<br>library is specified there, it must exist on the platform, because ./configure<br>tries to compile/link/execute a small app using those statements. For example,<br>the library libdl.so is Linux specific and does not exist on BSD-like platforms.<br><br>Furthermore, no supported platform/version was found, which still (ever?)<br>requires those additional libraries. Therefore, they were simply removed.<br><br>Finally, this change adds the error code ESTRPIPE to the channel driver<br>chan_alsa for those platforms which lack it, again for example NetBSD.<br><br>ASTERISK-27720<br><br>Change-Id: I3b21f2135f6cbfac7590ccdc2df753257f426e0b<br>---<br>M channels/chan_alsa.c<br>M configure<br>M configure.ac<br>3 files changed, 17 insertions(+), 13 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/channels/chan_alsa.c b/channels/chan_alsa.c<br>index ed7d5cf..a5dead1 100644<br>--- a/channels/chan_alsa.c<br>+++ b/channels/chan_alsa.c<br>@@ -39,6 +39,10 @@<br> <br> #include "asterisk.h"<br> <br>+#include <errno.h><br>+#ifndef ESTRPIPE<br>+#define ESTRPIPE EPIPE<br>+#endif<br> #include <fcntl.h><br> #include <sys/ioctl.h><br> #include <sys/time.h><br>diff --git a/configure b/configure<br>index afe61aa..5ccfd4f 100755<br>--- a/configure<br>+++ b/configure<br>@@ -19602,13 +19602,13 @@<br> <br>       ast_ext_lib_check_save_CFLAGS="${CFLAGS}"<br>       CFLAGS="${CFLAGS} "<br>-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for snd_spcm_init in -lasound" >&5<br>-$as_echo_n "checking for snd_spcm_init in -lasound... " >&6; }<br>-if ${ac_cv_lib_asound_snd_spcm_init+:} false; then :<br>+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for snd_pcm_open in -lasound" >&5<br>+$as_echo_n "checking for snd_pcm_open in -lasound... " >&6; }<br>+if ${ac_cv_lib_asound_snd_pcm_open+:} false; then :<br>   $as_echo_n "(cached) " >&6<br> else<br>   ac_check_lib_save_LIBS=$LIBS<br>-LIBS="-lasound ${pbxlibdir} -lm -ldl $LIBS"<br>+LIBS="-lasound ${pbxlibdir}  $LIBS"<br> cat confdefs.h - <<_ACEOF >conftest.$ac_ext<br> /* end confdefs.h.  */<br> <br>@@ -19618,27 +19618,27 @@<br> #ifdef __cplusplus<br> extern "C"<br> #endif<br>-char snd_spcm_init ();<br>+char snd_pcm_open ();<br> int<br> main ()<br> {<br>-return snd_spcm_init ();<br>+return snd_pcm_open ();<br>   ;<br>   return 0;<br> }<br> _ACEOF<br> if ac_fn_c_try_link "$LINENO"; then :<br>-  ac_cv_lib_asound_snd_spcm_init=yes<br>+  ac_cv_lib_asound_snd_pcm_open=yes<br> else<br>-  ac_cv_lib_asound_snd_spcm_init=no<br>+  ac_cv_lib_asound_snd_pcm_open=no<br> fi<br> rm -f core conftest.err conftest.$ac_objext \<br>     conftest$ac_exeext conftest.$ac_ext<br> LIBS=$ac_check_lib_save_LIBS<br> fi<br>-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_asound_snd_spcm_init" >&5<br>-$as_echo "$ac_cv_lib_asound_snd_spcm_init" >&6; }<br>-if test "x$ac_cv_lib_asound_snd_spcm_init" = xyes; then :<br>+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_asound_snd_pcm_open" >&5<br>+$as_echo "$ac_cv_lib_asound_snd_pcm_open" >&6; }<br>+if test "x$ac_cv_lib_asound_snd_pcm_open" = xyes; then :<br>   AST_ALSA_FOUND=yes<br> else<br>   AST_ALSA_FOUND=no<br>@@ -19649,7 +19649,7 @@<br> <br>    # now check for the header.<br>    if test "${AST_ALSA_FOUND}" = "yes"; then<br>-      ALSA_LIB="${pbxlibdir} -lasound -lm -ldl"<br>+      ALSA_LIB="${pbxlibdir} -lasound "<br>       # if --with-ALSA=DIR has been specified, use it.<br>       if test "x${ALSA_DIR}" != "x"; then<br>          ALSA_INCLUDE="-I${ALSA_DIR}/include"<br>diff --git a/configure.ac b/configure.ac<br>index 4b9b830..85881d7 100644<br>--- a/configure.ac<br>+++ b/configure.ac<br>@@ -1466,7 +1466,7 @@<br> <br> # do the package library checks now<br> <br>-AST_EXT_LIB_CHECK([ALSA], [asound], [snd_spcm_init], [alsa/asoundlib.h], [-lm -ldl])<br>+AST_EXT_LIB_CHECK([ALSA], [asound], [snd_pcm_open], [alsa/asoundlib.h])<br> <br> AST_EXT_LIB_CHECK([BFD], [bfd], [bfd_openr], [bfd.h])<br> # Fedora/RedHat/CentOS require extra libraries<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/8433">change 8433</a>. To unsubscribe, 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/8433"/><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-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: I3b21f2135f6cbfac7590ccdc2df753257f426e0b </div>
<div style="display:none"> Gerrit-Change-Number: 8433 </div>
<div style="display:none"> Gerrit-PatchSet: 5 </div>
<div style="display:none"> Gerrit-Owner: Alexander Traud <pabstraud@compuserve.com> </div>
<div style="display:none"> Gerrit-Reviewer: Alexander Traud <pabstraud@compuserve.com> </div>
<div style="display:none"> Gerrit-Reviewer: Corey Farrell <git@cfware.com> </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>