Date: Sat, 28 May 2016 15:30:41 +0000 (UTC) From: Diane Bruce <db@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r416003 - head/comms/svxlink/files Message-ID: <201605281530.u4SFUfsp063552@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: db Date: Sat May 28 15:30:41 2016 New Revision: 416003 URL: https://svnweb.freebsd.org/changeset/ports/416003 Log: Summary: comms/svxlink: Fix build with libc++ 3.8.0 During the exp-run in bug 208158, it was found that comms/svxlink gives errors with libc++ 3.8.0 [1]: /wrkdirs/usr/ports/comms/svxlink/work/svxlink-15.11/src/async/audio/AsyncAudioDe +viceAlsa.cpp:551:7: error: call to 'abs' is ambiguous if (::abs(real_rate - sample_rate) > 100) ^~~~~ This is because abs() is being called with an unsigned argument. Fix this by casting 'real_rate' to int, since it was assigned from 'sample_rate' anyhow. PR: ports/209371 Reported by: @dim Added: head/comms/svxlink/files/patch-src_async_audio_AsyncAudioDeviceAlsa.cpp (contents, props changed) Added: head/comms/svxlink/files/patch-src_async_audio_AsyncAudioDeviceAlsa.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/comms/svxlink/files/patch-src_async_audio_AsyncAudioDeviceAlsa.cpp Sat May 28 15:30:41 2016 (r416003) @@ -0,0 +1,11 @@ +--- src/async/audio/AsyncAudioDeviceAlsa.cpp.orig 2015-11-22 16:03:59 UTC ++++ src/async/audio/AsyncAudioDeviceAlsa.cpp +@@ -548,7 +548,7 @@ bool AudioDeviceAlsa::initParams(snd_pcm + return false; + } + +- if (::abs(real_rate - sample_rate) > 100) ++ if (::abs((int)real_rate - sample_rate) > 100) + { + cerr << "*** ERROR: The sample rate could not be set to " + << sample_rate << "Hz for ALSA device \"" << dev_name << "\". "
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605281530.u4SFUfsp063552>